jq
Command-line JSON processor for slicing, filtering, mapping and transforming structured data
jq is a command-line JSON processor that provides sed/awk/grep-like functionality for JSON data. Written in portable C with zero runtime dependencies, it enables users to slice, filter, map, and transform structured JSON data through a domain-specific query language.
The tool operates as a filter, taking JSON input and producing JSON output based on specified expressions. Users can extract specific fields, transform data structures, perform calculations, and apply complex queries to JSON documents. jq supports advanced operations including array manipulation, object construction, conditional logic, and mathematical operations on JSON data.
Developers, system administrators, and data engineers commonly use jq for processing API responses, configuration files, log analysis, and data pipeline operations. The tool integrates well into shell scripts and command pipelines, making it particularly valuable for automation tasks that involve JSON data manipulation. jq can be built as a statically linked binary and supports cross-compilation for various platforms.
Installation
# via Docker
docker run --rm -i ghcr.io/jqlang/jq:latest
# via Source
git submodule update --init && autoreconf -i && ./configure --with-oniguruma=builtin && make -j8 && sudo make install
Alternatives & related tools
jo
Command-line utility to create JSON objects and arrays from shell arguments and piped input
pandoc
Haskell library and command-line tool that converts documents between dozens of markup formats, including Markdown, LaTeX, HTML, docx, EPUB and PDF.
fx
Terminal-based JSON processor and viewer for querying, filtering, and manipulating JSON data interactively.
yq
Command-line YAML, JSON, XML, and CSV processor with jq-like syntax for querying and transforming structured data
gron
Transforms JSON into discrete assignments to make it greppable and enable exploration of complex JSON structures
add a badge to your README
Maintain jq? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/jq?utm_source=badge)<a href="https://www.trmn.sh/tools/jq?utm_source=badge"><img src="https://www.trmn.sh/badge/jq.svg" alt="Featured on trmn" height="20"></a>