Skip to main content

Build provenance: This package is built and distributed by Astral as part of astral-dev-toolchain. It packages jaq from tag v3.1.2 at commit f7fea9219d8d5364c91c6a0278765eaa0e6fa95e.


jaq

Build status Crates.io Documentation Rust 1.69+

jaq (pronounced /ʒaːk/, like Jacques1) is a clone of the JSON data processing tool jq. It has a few features not present in jq, such as support for the data formats YAML, CBOR, TOML, and XML. jaq has an own manual. You can try jaq on the playground.

jaq is two things at a time:

  • A command-line program, jaq, that can be used as drop-in replacement for jq.
  • A library, jaq-core, that can be used to compile and run jq programs inside of Rust programs. Compared to the jq API, jaq-core can be safely used in multi-threaded environments and supports arbitrary data types beyond JSON.

jaq focuses on three goals:

  • Correctness: jaq aims to provide a more correct and predictable implementation of jq, while preserving compatibility with jq in most cases.
  • Performance: I created jaq originally because I was bothered by the long start-up time of jq 1.6, which amounts to about 50ms on my machine. This can be particularly seen when processing a large number of small files. Although the startup time has been vastly improved in jq 1.7, jaq is still faster than jq on many other benchmarks.
  • Simplicity: jaq aims to have a simple and small implementation, in order to reduce the potential for bugs and to facilitate contributions.

Installation

Binaries

You can download binaries for Linux, Mac, and Windows on the releases page. On a Linux system, you can download it using the following commands:

$ curl -fsSL https://github.com/01mf02/jaq/releases/latest/download/jaq-$(uname -m)-unknown-linux-musl -o jaq && chmod +x jaq

You may also install jaq using homebrew on macOS or Linux:

$ brew install jaq
$ brew install --HEAD jaq # latest development version

Packaging status

From Source

To compile jaq, you need a Rust toolchain. See https://rustup.rs/ for instructions.

Any of the following commands install jaq:

$ cargo install --locked jaq
$ cargo install --locked --git https://github.com/01mf02/jaq # latest development version

On my system, both commands place the executable at ~/.cargo/bin/jaq.

If you have cloned this repository, you can also build jaq by executing one of the commands in the cloned repository:

$ cargo build --release # places binary into target/release/jaq
$ cargo install --locked --path jaq # installs binary

jaq should work on any system supported by Rust. If it does not, please file an issue.

Performance

The following evaluation consists of several benchmarks that allow comparing the performance of jaq, jq, and gojq. The empty benchmark runs n times the filter empty with null input, serving to measure the startup time. The bf-fib benchmark runs a Brainfuck interpreter written in jq, interpreting a Brainfuck script that produces n Fibonacci numbers. The other benchmarks evaluate various filters with n as input; see bench.sh for details.

I generated the benchmark data with bench.sh target/release/jaq jq-1.8.1 gojq-0.12.17 | tee bench.json on a Linux system with an AMD Ryzen 5 5500U.2 I then processed the results with a "one-liner" (stretching the term and the line a bit):

jq -rs '.[] | "|`\(.name)`|\(.n)|" + ([.time[] | min | (.*1000|round)? // "N/A"] | min as $total_min | map(if . == $total_min then "**\(.)**" else "\(.)" end) | join("|"))' bench.json

(Of course, you can also use jaq here instead of jq.) Finally, I concatenated the table header with the output and piped it through pandoc -t gfm.

Table: Evaluation results in milliseconds ("N/A" if error or more than 10 seconds).

Benchmark n jaq-3.0 jq-1.8.1 gojq-0.12.18
empty 512 410 430 270
bf-fib 13 530 1030 530
defs 100000 50 N/A 960
upto 8192 0 440 450
reduce-update 16384 0 720 1320
reverse 1048576 30 440 300
sort 1048576 90 430 550
group-by 1048576 260 1790 1580
min-max 1048576 180 200 300
add 1048576 390 520 1290
kv 131072 110 120 280
kv-update 131072 130 440 550
kv-entries 131072 520 980 870
ex-implode 1048576 600 890 560
reduce 1048576 740 700 N/A
try-catch 1048576 220 200 390
repeat 1048576 170 610 500
from 1048576 340 730 550
last 1048576 20 150 170
pyramid 524288 300 250 470
tree-contains 23 90 830 230
tree-flatten 17 700 330 10
tree-update 17 430 910 1830
tree-paths 17 140 230 780
to-fromjson 65536 50 350 100
ack 7 570 490 540
range-prop 128 370 250 210
cumsum 1048576 240 250 510
cumsum-xy 1048576 380 350 750
str-slice 8192 170 650 120

The results show that jaq-3.0 is fastest on 20 benchmarks, whereas jq-1.8.1 is fastest on 5 benchmarks and gojq-0.12.18 is fastest on 6 benchmarks. gojq is much faster on tree-flatten because it implements the filter flatten natively instead of by definition.

Security

jaq tries to guarantee that:

  • It does not panic (except in cases of resource exhaustion, see below).
  • It does not corrupt memory, i.e. it is memory-safe.
  • It does not allow input data and jq filters to initiate I/O operations (except for reading files by jq filters before filter execution).

Any case where such a guarantee is broken is a bug and should be reported.

On the other hand, jaq does not take countermeasures against any kind of resource exhaustion. That means that jaq may take unlimited time, memory, or stack space. For example, this may lead to stack overflows when:

  • Reading input data: jaq -nr 'repeat("[")' | jaq
  • Writing output data: jaq -nc 'nth(1000000; recurse([.]))'
  • Running jq filters: jaq -n 'def f: 1+f; f'

jaq's core has been audited by Radically Open Security as part of two NLnet grants --- thanks to both organisations for their support! The first and second security audit found several issues of moderate or low severity. All issues in the security audits were addressed and several fuzzing targets for jaq were added at jaq-core/fuzz. Before that, jaq's JSON parser hifijson already disposed of a fuzzing target. Finally, jaq disposes of a test suite of more than 500 tests.

User Testimonials

jaq is a well-built library that gave me a massive leg up compared to implementing jq support on my own. Extensibility through the ValT trait made adding jq support to my own types a breeze.

@jobarr-amzn (https://github.com/amazon-ion/ion-cli/pull/193#pullrequestreview-2696367084, https://github.com/01mf02/jaq/issues/355#issuecomment-3457076847)

My Rust program [using jaq] can execute all queries over all files three times while Python is busy executing one query across all files using the jq PyPI crate and a Python loop.

@I-Al-Istannen (https://github.com/01mf02/jaq/issues/323#issuecomment-3282176968)

jaq is very impressive! Running my wsjq interpreter with it is significantly faster than with any other jq implementation and its emphasis on correctness is very admirable. [On wsjq benchmarks, jaq is between 5 and 10 times faster than jq and between 15 and 196 times faster than gojq.]

@thaliaarchi (https://github.com/01mf02/jaq/issues/355#issuecomment-3460028137)

I had been parsing data from certificate transparency logs using certstream-server. It gives a lot of data and piping it into jq was causing me issues. I switched to jaq and the faster startup time meant it could easily keep up on the low end VM I was using. Thank you for your work.

Oliver (via e-mail)

Add your own testimonials via https://github.com/01mf02/jaq/issues/355.

Acknowledgements

This project was funded through the NGI0 Entrust and NGI0 Commons funds established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreements № 101069594 and № 101135429. Additional funding is made available by the Swiss State Secretariat for Education, Research and Innovation (SERI).

  1. I wanted to create a tool that should be discreet and obliging, like a good waiter. And when I think of a typical name for a (French) waiter, to my mind comes "Jacques". Later, I found out about the old French word jacquet, meaning "squirrel", which makes for a nice ex post inspiration for the name. And finally, the Jacquard machine was an important predecessor of the modern computer, automating weaving with punched cards as early as 1804. ↩

  2. jq-1.8.1 was installed from the official Arch Linux package and gojq-0.12.18 was retrieved from its GitHub release page. ↩

Metadata

Release files for astral-dev-toolchain-jaq 3.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for astral-dev-toolchain-jaq 3.1.2
File Actions
astral_dev_toolchain_jaq-3.1.2-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for astral_dev_toolchain_jaq-3.1.2-py3-none-win_arm64.whl
astral_dev_toolchain_jaq-3.1.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for astral_dev_toolchain_jaq-3.1.2-py3-none-win_amd64.whl
astral_dev_toolchain_jaq-3.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for astral_dev_toolchain_jaq-3.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
astral_dev_toolchain_jaq-3.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for astral_dev_toolchain_jaq-3.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
astral_dev_toolchain_jaq-3.1.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for astral_dev_toolchain_jaq-3.1.2-py3-none-macosx_11_0_arm64.whl
astral_dev_toolchain_jaq-3.1.2-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for astral_dev_toolchain_jaq-3.1.2-py3-none-macosx_10_12_x86_64.whl

Total release size: 11.4 MB

Release files / astral_dev_toolchain_jaq-3.1.2-py3-none-win_arm64.whl

Download URL astral_dev_toolchain_jaq-3.1.2-py3-none-win_arm64.whl
Size 1.9 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
5616b132b05f650d111417f402a33b0531bdcb760f8df1c399ee6785418af908
BLAKE2b-256 checksum
How to use checksums
d7c67219affb9b23393559f2b50f288dd17515e802678c46acddc5c292b61ab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / astral_dev_toolchain_jaq-3.1.2-py3-none-win_amd64.whl

Download URL astral_dev_toolchain_jaq-3.1.2-py3-none-win_amd64.whl
Size 2.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
4d8541c8dec14ef7e9fddd3fb862e5f0d3b5c483a8e3e89e90a67ecdb7860397
BLAKE2b-256 checksum
How to use checksums
191055a6dfcee512108971874fa1f6c93b4ff2e5814b2a9ab47ec35215853b0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / astral_dev_toolchain_jaq-3.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL astral_dev_toolchain_jaq-3.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
351fbe7f18d1c8459d42608ba8f7193878bd796cd64e2be0933f23bdb5529d90
BLAKE2b-256 checksum
How to use checksums
edd0427d19f62cc6a4cce981af1ab9c9e04794d671918881961e563b8ac49d3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / astral_dev_toolchain_jaq-3.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL astral_dev_toolchain_jaq-3.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.9 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f060c1bc59235dc11e4ef1108c051151dd78b96f053f2f9af26852a6ee7ac75c
BLAKE2b-256 checksum
How to use checksums
7c329dbcb58c0d1eb35373ac69a0d7af1f501c13c97eeafe11071079faea9c37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / astral_dev_toolchain_jaq-3.1.2-py3-none-macosx_11_0_arm64.whl

Download URL astral_dev_toolchain_jaq-3.1.2-py3-none-macosx_11_0_arm64.whl
Size 1.8 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b6638a1aef242563e886bdbcfd9997506246b4b9f7df664c3791181a69886213
BLAKE2b-256 checksum
How to use checksums
3cc1b1eea1218ab6387a65258634602caa95150a80bc0b6e6b702d3e02719b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / astral_dev_toolchain_jaq-3.1.2-py3-none-macosx_10_12_x86_64.whl

Download URL astral_dev_toolchain_jaq-3.1.2-py3-none-macosx_10_12_x86_64.whl
Size 1.9 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
fd1c4d42f89615bbe1e6647b2aea3f4973b86feeb3b262dd2b0d10148b3bf64c
BLAKE2b-256 checksum
How to use checksums
4df3b800d07f0f568ebcaf0db1392f2f7481f64a3c8f7602598ff6e6f85f2ebd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for astral-dev-toolchain-jaq 3.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for astral_dev_toolchain_jaq-3.1.2-py3-none-win_arm64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.1.2 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page