A jq clone in Rust focused on correctness, speed and simplicity, usable as a jq-compatible CLI or as a library.
jqlang/jq
A lightweight command-line JSON processor, written in portable C with no runtime dependencies, for slicing, filtering, mapping and transforming JSON.
- Stars
- 36,056
- Forks
- 3,068
- Open issues
- 419
- Last commit
- 6 days ago
What is it?
jq works like sed, awk or grep for JSON data. You pipe JSON into it and write a filter expression to select fields, reshape objects, or compute new values, and it prints the result to standard output.
It is written in portable C and has zero runtime dependencies, so it can be installed as a single standalone executable. Prebuilt binaries are published for macOS and Linux on the release page, and a Docker image is available. Building from source requires libtool, make, automake and autoconf, and the project supports static linking and cross-compilation.
The project provides an online playground at play.jqlang.org for trying filters before using them in scripts.
Key features
- 01Selects, filters, maps and transforms JSON with a filter expression language.
- 02Runs as a standalone executable with zero runtime dependencies.
- 03Written in portable C and can be built statically or cross-compiled.
- 04Available as prebuilt binaries for macOS and Linux and as a Docker image.
- 05Includes an online playground for testing filters.
Use cases
- Extracting a field such as a version number from a package.json file in a shell script.
- Reshaping API responses into a different structure before storing or displaying them.
- Filtering large JSON logs or exports from the command line.
- Running JSON transformations inside Docker or CI pipelines without installing extra runtimes.
Quick start
- 1
Download the prebuilt binary from the releases page
- 2
Make the downloaded file executable (after renaming it to jq)
chmod +x jq - 3
Or run it with Docker on a package.json file
docker run --rm -i -v "$PWD:$PWD" -w "$PWD" ghcr.io/jqlang/jq:latest '.version' package.json
In collections
Topics
FAQ
- What is jq?
- A lightweight command-line JSON processor, written in portable C with no runtime dependencies, for slicing, filtering, mapping and transforming JSON. jq works like sed, awk or grep for JSON data. You pipe JSON into it and write a filter expression to select fields, reshape objects, or compute new values, and it prints the result to standard output.
- Is jq free to use? What license does it have?
- jq is open source under the Other license. Check the license terms before using it in commercial products.
- Is jq still maintained?
- Actively maintained. The last commit to jq was on Nov 2, 2026.
- What can I use jq for?
- Extracting a field such as a version number from a package.json file in a shell script. Reshaping API responses into a different structure before storing or displaying them. Filtering large JSON logs or exports from the command line. Running JSON transformations inside Docker or CI pipelines without installing extra runtimes.
- How do I install jq?
- Download the prebuilt binary from the releases page Make the downloaded file executable (after renaming it to jq): chmod +x jq Or run it with Docker on a package.json file: docker run --rm -i -v "$PWD:$PWD" -w "$PWD" ghcr.io/jqlang/jq:latest '.version' package.json
- Where can I get jq?
- The source code and installation instructions are on GitHub: https://github.com/jqlang/jq
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A jq-like command-line tool and query language for slicing, filtering and transforming Markdown files.
A jq-like command-line tool and query language for inspecting and querying binary file formats, with decoders for dozens of formats.
A command-line tool and Go library for querying and modifying JSON, YAML, TOML, XML, CSV and other structured data with one selector syntax.
A declarative Go package for building command line tools, with subcommands, flags, shell completion and help generation.
A terminal JSON viewer and processor that lets you browse, fold and transform JSON interactively in the shell.