jq

Slice, filter, and reshape JSON straight from the command line — no script file required.

$ curl -s https://api.github.com/repos/jqlang/jq | jq '.stargazers_count'
31842

Why bother?

jq does for JSON what sed and grep do for plain text: it lets a one-line command reach into a blob of data and pull out, reshape, or filter exactly the part you need. It's a single, dependency-free binary, so it drops into any pipeline — shell scripts, CI logs, an API response you're poking at in a terminal — without dragging in a language runtime.

Three things you can do right now

Pretty-print anything

echo '{"a":1,"b":[2,3]}' | jq .

No arguments needed — bare jq . reformats compact JSON into something a human can read.

Pull out one field

jq '.user.login' event.json

Dot-paths walk into nested objects the same way you'd write them in JavaScript, minus the semicolons.

Filter a list

jq '.[] | select(.stars > 100)' repos.json

select() turns an array into just the elements that pass a test — the workhorse of most real one-liners.

About this redesign

I like jq: it's small, fast, dependency-free, and I reach for it most days. But its homepage, jqlang.org, spends its first screen on a download panel and its next several screens on a changelog running back to 2013 — useful once you already know jq, but it never shows a newcomer what the tool actually does. There's no example anywhere on the page; you have to click through to the tutorial or manual before seeing jq run on real input.

This page moves a worked example above the fold, replaces the release history with three runnable recipes, and rewrites the pitch in plainer language. It links back to the real site for downloads, the manual, and everything else jq actually needs to ship — this is a better front door, not a replacement project.