jq Playground (Online jq Tester)

Developer Tools

Run real jq filters on pasted JSON and see the output as you type.

Options
Options
JSON input437 B
Output

Processed in your browser. A copy of each run is saved to your past runs so you can reopen it. Privacy

About

What the jq Playground does

The jq Playground runs jq, the command-line JSON processor, on JSON you paste, using jq itself compiled to WebAssembly, so filters behave exactly as they do in a terminal. Output updates as you type. The -c, -r and -s flags and --arg variables are supported, examples cover select, map, sort_by, group_by and updates, and a share link keeps the filter in the URL fragment.

Steps

How to use it

  1. 1Paste JSON, or use the sample list of users.
  2. 2Type a jq filter or pick an example.
  3. 3Read the output, set flags if needed, and copy the result or share the filter.

Example

A real run

Input

Filter: .[] | select(.active) | {name, email}

[
  {"name": "Ada Lovelace", "email": "ada@example.com", "active": true},
  {"name": "Alan Turing", "email": "alan@example.com", "active": false},
  {"name": "Grace Hopper", "email": "grace@example.com", "active": true}
]

Output

{
  "name": "Ada Lovelace",
  "email": "ada@example.com"
}
{
  "name": "Grace Hopper",
  "email": "grace@example.com"
}

(jq-1.8.2)

.[] streams each user, select(.active) keeps the active ones and {name, email} builds a new object with just those two fields, so Alan Turing is left out.

Options

Every setting, and when to use it

-c, -r and -s
-c prints each result on one line; -r prints strings without quotes, for shell scripts and plain lists; -s reads all input values into one array, for input that is several JSON values or JSON Lines.
--arg
Defines variables such as team=platform, used in the filter as $team, the safe way to put outside values into a filter instead of editing it.
Examples and share link
Common patterns on the sample data: filtering, picking fields, sorting, grouping and counting, averaging, and updating fields with |=. Share link stores the filter, and small inputs, in the link itself.

Good to know

Common problems and limits

JSON up to 10 MB. Each run happens in a background worker that is stopped after 5 seconds, so an endless filter cannot freeze the page.

This is jq 1.8 in WebAssembly; file and environment access ($ENV, input_filename, --rawfile) are not available in the browser.

For simpler path queries, the JSONPath Tester may be enough; to tidy the result, use the JSON Formatter.

Audience

Who uses it

  • Developers and DevOps engineersWork out a jq filter for a script, a CI step or a kubectl or AWS CLI pipeline before running it.
  • API and data engineersReshape an API response, extract fields or count records without writing a program.
  • LearnersTry jq's operators on real data and see the result instantly instead of re-running a terminal command.

FAQ

Frequently asked

How do I sort an array with jq?

sort works on simple values, and sort_by(.field) sorts objects by a field: sort_by(.commits) | reverse puts the largest first. To sort by several fields, use sort_by(.team, .name).

Can jq modify JSON?

Yes. jq outputs new JSON rather than editing a file in place: .price |= . * 1.1 raises every price by 10 percent, del(.password) removes a key, and . + {active: true} adds one. Redirect the output to a new file to save the change.

What is the difference between jq and yq?

jq processes JSON. yq applies jq-like expressions to YAML (and often XML and TOML), which makes it handy for Kubernetes and CI files. There are two popular yq tools with different syntax, so check which one a guide uses.

How do I install jq on Windows?

winget install jqlang.jq or choco install jq, or download jq.exe from jqlang.org. In PowerShell, quote filters with single quotes; in cmd.exe, use double quotes and escape inner quotes.

What is the difference between jq and JSONPath?

JSONPath only selects values from a document. jq is a complete language: it selects, but also transforms, computes, reshapes and builds new JSON. For a quick selection either works; for anything more, jq.

Is my JSON sent anywhere?

No. jq runs in your browser in WebAssembly. A copy of the filter and input is saved to your past runs when you press Run or copy the output.

Automation: an MCP tool run_jq(json, filter, flags) → output and an n8n node are planned for this tool.

GuideJSON, YAML, TOML and XML: which format when →When to use JSON, YAML, TOML or XML: what each is good at, the traps (YAML's no, JSON's big numbers, XML attributes) and how to convert between them.
Built and maintained by Radhika SinghLast updated Questions: hello@operativez.ai