jq
The command-line JSON processor: slice, filter, map and transform structured data the way sed and awk handle text.
These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.
2 more ways to get jq
Package managers
- Chocolatey
choco install jq - Homebrew
brew install jq
About jq
jq is what turns a wall of JSON from an API into the three fields you actually wanted. It has its own small filter language, so `jq '.items[] | .name'` pulls a field out of every element of an array, and more complex expressions build new JSON structures entirely.
It is written in portable C with zero runtime dependencies and ships as a standalone executable rather than an archive, so installing it is a matter of putting one file on your PATH. Every major Linux distribution packages it, and there is an official Docker image and an online playground for testing expressions.
Strengths
- A small, expressive language for querying and reshaping JSON
- Portable C with zero runtime dependencies; the download is one executable
- Packaged by every major distribution plus an official Docker image
- An online playground for working out an expression before you run it
Limitations
- The filter syntax is terse and takes practice before it feels natural
- Error messages on malformed input are not always helpful
- Very large documents are loaded into memory unless you use streaming mode
- No graphical interface of any kind
Details
- Pricing
- FreeFree and open source under the MIT licence.
- License
- MIT
- Developer
- jqlang
- Platforms
- Windows, macOS, Linux, Command line
- How it runs
- Downloadable app
- Account
- Not required
- Works offline
- Yes
- Best suited for
- Pulling specific fields out of JSON in a shell script or at the command line
- Categories
- CLI tools
- Last verified
- Added
- Provenance
- Selected from the TechWalrus downloads catalog (Dev Tools); facts checked against the developer's own pages, 2 sources on file.
Alternatives to jq
Compare allSoftware that can replace jq for an important use case, and what changes if you switch.
gojq
Process JSON with a Go implementation of jq.
gojq is a Go implementation of jq that also works as a Go library, with broad but not identical compatibility with existing jq filters.
jaq
Run jq-style queries through a Rust command-line tool and library.
jaq runs jq-style queries through a Rust tool and library with extra data formats, though some behavior differs from jq, so filters need checking.
yq
Command-line processor for YAML, JSON, XML, CSV and TOML.
yq applies a jq-like syntax to YAML, JSON, XML, CSV and TOML and preserves YAML comments, but its expressions differ from jq in places.
Dasel
Query and update structured files through a consistent command syntax.
Dasel queries and updates several structured formats with one consistent command syntax of its own, so existing jq filters would need rewriting.
Similar software
Related functionality, not necessarily a direct replacement.
jnv
Edit jq-style filters while previewing JSON results interactively.
fx
Inspect JSON interactively from your terminal.
jid
Explore JSON interactively with query suggestions.
jless
Browse large JSON structures in a keyboard-driven terminal viewer.
jc
Convert command output into JSON for easier scripting.
qsv
Query, transform and validate tabular data from the terminal.