JQ Tools

jq is a command-line JSON processor for selecting, filtering, and transforming data. Use the browser playground for quick experiments, follow the tutorial to learn the language, or keep the cheatsheet nearby while working in a terminal.

jq works especially well in pipelines, where a compact filter can turn large API responses and configuration files into exactly the shape you need.

Open JQ Playground

Choose a starting point

Common jq patterns

Three small filters that cover the core select, filter, and reshape workflow.

Select a field

$ cat data.json | jq '.field'

Filter by a condition

$ cat data.json | jq '.[] | select(.field == "value")'

Reshape an object

$ cat data.json | jq '{ newfield: .field, newfield2: .field2 }'

Go deeper