jq Playground

Paste JSON, write a jq filter, and see the result instantly. Runs the real jq 1.8.2 entirely in your browser.

Your JSON is processed locally by jq running in your browser and is never uploaded, but avoid pasting secrets or production data into any tool.

Built and maintained by Udit Agarwal

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 runs the real jq 1.8.2 in your browser, 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 entirely 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 in your browser, 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
  • The jq engine loads only when you first run a filter, then stays warm

How to use the jq Playground

  1. Paste or type your JSON into the JSON box.
  2. Write a jq filter in the filter box, for example .users | map(.name).
  3. Watch the output update, or press Run / Cmd+Enter to evaluate immediately.
  4. Toggle raw (-r) or compact (-c) if you need different formatting.
  5. 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 the real jq 1.8.2 in your browser, 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. 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 entirely 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 engine 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.

Guides

More JSON tools

  • TypeScript to Mock JSON — Generate realistic mock JSON from a TypeScript interface or type.
  • JSON Schema Sample Data Generator — Generate realistic sample JSON that conforms to a JSON Schema.
  • JSON to XML Converter — Convert JSON to XML and XML back to JSON, in your browser.
  • NDJSON to JSON — Convert NDJSON / JSON Lines to a JSON array and back, line by line.
  • Sort JSON Keys — Recursively sort JSON object keys alphabetically, with pretty-print and reverse options.
  • CSV to JSON — Convert CSV or TSV to JSON with type inference and nested keys, in your browser.
  • Excel to JSON — Convert an .xlsx or .xls spreadsheet to JSON, with sheet and header options, in your browser.
  • Excel to CSV — Convert an .xlsx or .xls spreadsheet to clean CSV or TSV, in your browser.
  • CSV to SQL — Convert CSV to SQL INSERT and CREATE TABLE statements for MySQL, PostgreSQL, SQLite and SQL Server.
  • HTML Table to JSON — Extract HTML tables into JSON or CSV, honoring headers and colspan, in your browser.
  • JSON Patch Generator — Generate an RFC 6902 JSON Patch between two JSON documents and apply a patch to a source.
  • JSON Repair — Fix broken or LLM-generated JSON: trailing commas, single quotes, unquoted keys and comments.

See all JSON tools (29) · All tools