jq Playground
Paste JSON, write a jq filter, and see the result instantly. Runs the real jq compiled to WebAssembly, entirely in your browser.
Your JSON is processed locally by jq running as WebAssembly in your browser and is never uploaded, but avoid pasting secrets or production data into any tool.
Need a JSONPath instead of jq? Try the JSONPath Evaluator.
About jq Playground
This jq playground lets you run jq filters against JSON without installing anything. Paste a JSON document, type an expression such as .users | map(.name), .[] | select(.active), or group_by(.type), and the result appears as you type. It is the real jq 1.8.2 compiled to WebAssembly, so the same filters, functions, and pipe syntax you use on the command line work here, including map, select, sort_by, group_by, to_entries, and string interpolation. Toggle raw output (-r) to drop quotes from string results, or compact output (-c) to put each value on one line. jq compile and runtime errors are shown so you can fix a filter quickly. Because jq runs as WebAssembly inside the page, the JSON you paste is processed locally on your device and is never uploaded to a server.
Features
- Runs the real jq 1.8.2 compiled to WebAssembly, not a partial reimplementation
- Live results on a debounced change, plus a Run button and Cmd/Ctrl+Enter
- Raw output (-r) toggle to emit unquoted strings
- Compact output (-c) toggle for one value per line
- Clear jq compile and runtime errors surfaced from stderr
- Clickable example filters (map, select, group_by, length, sort) that fill the query
- Copy the output with one click
- WASM loads only when you first run a filter, then stays warm
How to use the jq Playground
- Paste or type your JSON into the JSON box.
- Write a jq filter in the filter box, for example .users | map(.name).
- Watch the output update, or press Run / Cmd+Enter to evaluate immediately.
- Toggle raw (-r) or compact (-c) if you need different formatting.
- Click Copy to grab the result.
Example
Input
{
"users": [
{ "name": "Ada", "active": true },
{ "name": "Linus", "active": false }
]
}
Output
[
"Ada"
]
The filter .users | map(select(.active)) | map(.name) keeps only active users and returns their names.
Common errors & troubleshooting
- jq reports a syntax error like "Unexpected end of input" or "unexpected token". — Check the filter for an unbalanced bracket or pipe, e.g. .[ should be .[] or .[0]; jq parses the whole expression before running it.
- "Cannot iterate over null" or "Cannot index ... with ...". — The path does not exist on your data. Use optional access like .users[]? or .field // empty, and confirm the key names match your JSON.
- String output still has surrounding quotes. — That is normal JSON output. Turn on raw output (-r) to emit the string without quotes, which is what you usually want when piping to a shell.
- The output is empty even though the filter looks right. — Your filter may have produced no values (for example a select that matched nothing). Try the identity filter . first to confirm the JSON parses, then narrow down.
Frequently asked questions
- Does this run the real jq?
- Yes. It runs jq compiled to WebAssembly, so it is the actual jq engine, not a JavaScript reimplementation. The filters, built-in functions, and pipe semantics match the jq you run in a terminal.
- What jq version is supported?
- jq 1.8.2, via the jq-wasm build. Functions and syntax available in jq 1.8 — such as group_by, to_entries, ltrimstr, and string interpolation with \(...) — work here.
- What do the raw (-r) and compact (-c) toggles do?
- Raw output (-r) prints string results without the surrounding quotes, matching jq's -r flag. Compact output (-c) prints each JSON value on a single line instead of pretty-printing, matching jq's -c flag.
- Is my JSON uploaded anywhere?
- No. jq runs as WebAssembly inside this page, so the JSON you paste and the filter you write are evaluated locally on your device and are not sent to a server.
- Why is the first run a little slower?
- The jq WebAssembly module is downloaded and initialized the first time you run a filter, which is why you see a brief loading state. After that it stays in memory and subsequent runs are fast.
- Can I run filters with select, map, and group_by?
- Yes. Expressions like .[] | select(.active), .users | map(.name), and group_by(.type) all work, along with the rest of jq's filtering, transformation, and aggregation functions.
Related tools
- JSON Formatter — Beautify, minify and validate JSON with error locations.
- JSONPath Evaluator — Query JSON with a JSONPath expression and see matched values and paths live.
- JSON Viewer — Text + collapsible tree viewer with expand/collapse and node paths.
- JSON Flatten / Unflatten — Flatten nested JSON to dot-notation keys, or unflatten it back.
- JSON Diff — Compare two JSON documents and see a structural, key-order-independent diff.
- YAML ↔ JSON — Convert YAML to JSON and back.
All ArrayKit tools