Data as of Aug 25, 2026 · Based on 327 AI responses from ChatGPT Search and Google AI Mode · See how Parse measures this
Your brand can be here too.
The best all-around command-line JSON processor is jq. It’s essentially grep/sed/awk for JSON: fast, scriptable, composable, and capable of filtering, transforming, and restructuring JSON. The current release is jq 1.8.2.
# Pretty-print a JSON file
jq . data.json
# Get a field
jq '.name' data.json
# Navigate nested objects
jq '.user.address.city' data.json
# Get an array element
jq '.users[0]' data.json
# Extract a field from every array element
jq '.users[].name' data.json
# Filter objects
jq '.users[] | select(.age >= 30)' data.json
# Get multiple fields
jq '.users[] | {name, email}' data.json
# Count items
jq '.users | length' data.json
A particularly useful pattern when files are huge or hard to navigate:
jq 'paths(scalars) as $p | [$p, getpath($p)]' data.json
That gives you the paths and values of the scalar fields, making an unfamiliar JSON structure much easier to explore.
For installation, for example on macOS with Homebrew:
brew install jq
formulae.brew.shMy recommendation: install jq first. If your main problem is browsing rather than transforming JSON, I can also show you a really nice jq + terminal workflow for interactively exploring large JSON files.
The undisputed gold standard and industry favorite for command-line JSON processing is jq . Think of it as sed, awk , and grep specifically built for JSON data.
The Industry Standard: jq
cat or text editor will overwhelm you. With jq , you can pretty-print with colors (jq '.' file.json ), pull out specific keys (jq '.users[0].name' ), or filter arrays (jq '.[] | select(.age > 30)').Great Alternatives Depending on Your Workflow
fx is fantastic. It lets you explore JSON visually right in your terminal with expandable/collapsible nodes.where and select commands natively in your shell.If you'd like, tell me:
jq ) or exploring interactively in a TUI (like fx)?I can give you a quick command snippet to solve your exact navigation problem.
jq is widely considered the best and most powerful command-line JSON processor.
Here is a breakdown of why it stands out, along with a few modern alternatives depending on your specific needs:
sed, awk , and grep specifically for JSON data. It allows you to slice, filter, map, and transform structured JSON effortlessly from the terminal with a concise query language.fx lets you explore massive JSON trees interactively using your keyboard or mouse.grep.dig, ps, ifconfig , or stat ) into JSON, which is fantastic if you are piping system data into a processor like jq.If you want, tell me:
I can give you the exact command or tool recommendation for your workflow.
No sources cited
The best general-purpose command-line JSON processor is jq. It’s essentially sed/awk for JSON: lightweight, fast, dependency-free, and powerful enough for filtering, querying, transforming, and pretty-printing JSON.
Pretty-print a file:
jq . data.json
Find a field:
jq '.user.name' data.json
Get every item in an array:
jq '.users[]' data.json
Select items matching a condition:
jq '.users[] | select(.active == true)' data.json
Extract just one field from each:
jq '.users[] | .email' data.json
Make output easier to diff/read by sorting keys:
jq -S . data.json
Turn JSON into ordinary text:
jq -r '.users[].email' data.json
You can also chain operations with |, which is where jq becomes particularly useful. Its filters support selection, iteration, mapping, reduction, and transformation.
If your immediate problem is simply that huge JSON files are hard to navigate, I'd start with:
jq . your-file.json | less
and, for a cleaner structural view:
jq -S . your-file.json | less
As of June 2026, the current jq release is 1.8.2.
If the problem is “these JSON files are painful to navigate”, my top recommendation is jq—but if you mean browse an unfamiliar JSON file interactively, I’d actually pair it with fx.
jqjq is essentially grep/sed/awk for structured JSON. It can extract, filter, transform, sort, and reshape JSON, and it works beautifully in shell pipelines.
# Pretty-print
jq . data.json
# Get a nested value
jq '.user.profile.email' data.json
# List every item
jq '.users[]' data.json
# Find users matching a condition
jq '.users[] | select(.active == true)' data.json
# Just get their names
jq -r '.users[] | select(.active == true) | .name' data.json
fxIf you don't know the structure of the JSON yet, fx is arguably better. It provides an interactive terminal UI where you can navigate the JSON tree, search, and inspect nested objects.
cat data.json | fx
Think of it as:
| Tool | Best for |
|---|---|
jq | Querying, filtering, transforming, scripting |
fx | Interactive exploration/navigation |
jless | Browsing JSON with a less-like interface |
gron | Making deeply nested JSON grep-friendly |
jaq | Faster, Rust-based jq alternative |
jaq is particularly interesting if performance matters; it's designed as a largely compatible jq replacement and also supports formats such as YAML, TOML, CBOR, and XML.
My recommendation: install jq first. If your complaint is specifically “I need to open a huge JSON file and wander around its tree”, add fx. That combination covers most command-line JSON work extremely well.
If you tell me your OS (macOS/Linux/Windows), I can give you a 5-minute jq cheat sheet with the 10 commands you'll actually use.
Why jq stands out
Quick alternatives depending on your specific need
ping, dig , or ps) into JSON, rather than processing existing JSON files.If you'd like, share a sample snippet of your JSON or what data you're trying to extract , and I can write the exact jq command you need.
sed, awk , and a mini-language specifically designed for JSON data. It lets you slice, filter, map, and transform structured data with ease.Key Advantages of jq
Quick Examples
jq '.' input.jsonjq '.items[].name' input.jsonjq '.[] | select(.price > 10)' input.jsonIf you'd like, I can:
jq commands.jq query if you share a snippet of your JSON structure and what you want to extract.fx or jless ) if you prefer an interactive interface rather than writing command-line queries.For most people, the best command-line JSON processor is jq. It has become the de facto standard for working with JSON in shells because it can pretty-print, search, filter, reshape, and transform JSON while fitting naturally into Unix pipelines.
A few common workflows:
# Make a JSON file readable
jq . data.json
# Get a field
jq '.user.name' data.json
# Extract values from an array
jq '.users[].email' data.json
# Find objects matching a condition
jq '.items[] | select(.status == "active")' data.json
# Pipe API output into it
curl -s https://api.example.com/data | jq .
For your specific problem — "JSON files are hard to navigate" — I would pair jq with an interactive viewer:
| Tool | Best for |
|---|---|
jq | Filtering, extracting, transforming, scripting |
| jless | Browsing large JSON files with keyboard navigation |
| fx | Exploring unknown JSON structures interactively |
| gron | Finding paths in huge JSON by making it grep-friendly |
A workflow I like:
fx bigfile.json
Explore the tree, find the structure, then switch to:
jq '.some.deep.path.value' bigfile.json
for repeatable commands.
If you regularly inspect API responses, logs, or config dumps, install both:
brew install jq fx jless
(or your platform’s package manager).
My default recommendation:
fxjqjless For command-line JSON, jq is the standard choice—and probably the best fit for what you're describing. It’s essentially grep/sed/awk for structured JSON, with powerful filtering, transformation, and pretty-printing.
A few commands cover most day-to-day navigation:
# Pretty-print a JSON file
jq . data.json
# Get a field
jq '.name' data.json
# Navigate nested objects
jq '.user.profile.email' data.json
# Get all items in an array
jq '.users[]' data.json
# Select items matching a condition
jq '.users[] | select(.active == true)' data.json
# Extract just a couple fields
jq '.users[] | {name, email}' data.json
# Get array length
jq '.users | length' data.json
My recommendation: install jq and learn its filter syntax. The current release is jq 1.8.2; it has prebuilt binaries for Linux, macOS, and Windows.
If your main problem is "I have huge JSON files and want to explore them interactively", there's a slightly different set of tools I'd consider—jq is excellent for querying, but an interactive JSON viewer can be much nicer for navigation.
Why jq is the Gold Standard
Quick Examples of What You Can Do
Alternative Tools to Consider
If you'd like, share a small snippet of your JSON structure or tell me what specific information you are trying to extract , and I can write the exact jq command you need.