Json Web Viewer
All tools

jq playground — run real jq queries online

A jq playground backed by the actual jq engine, not a JavaScript approximation of it. Paste a document, write a jq program, and get jq's real output and jq's real error messages, entirely in your browser.

Json Web Viewer's Transform modal ships jq 1.8.2, compiled from its own C source to WebAssembly rather than reimplemented in JavaScript. That distinction is the whole point of a jq playground: a filter that works against your terminal's jq works here unmodified, and when a program is wrong, the error you see is jq's own error, not a lookalike tool's guess at one.

jq is offered as a second query language alongside JMESPath, selectable from the dropdown next to the mode buttons inside the Transform modal. The two aren't interchangeable — the built-in no-code wizard only generates JMESPath; if you switch the language to jq, the wizard tells you so and steps aside, and jq programs are typed by hand from there.

The jq engine itself is a separate, lazily-loaded chunk (roughly 930 KB uncompressed, about 350 KB over the wire with gzip) that only downloads the first time you actually run a jq query — sticking to JMESPath, or never opening Transform, costs nothing extra. And if a jq program runs long — an unbounded range, an accidental infinite recursion — you can cancel it; cancellation is backed by actually terminating the worker running it, not a flag the program has to cooperate with, which is what makes it work even against a query written to never check back in.

Example — this JSON:

{
  "orders": [
    { "id": "ord_1", "status": "shipped", "total": 42.5 },
    { "id": "ord_2", "status": "pending", "total": 18.0 },
    { "id": "ord_3", "status": "shipped", "total": 91.25 }
  ]
}

with this jq program:

[.orders[] | select(.status == "shipped") | .total] | add

returns:

133.75

Open this example in the editor →
The link above pre-loads the orders example into Text mode. A share link can't pre-open Transform or pre-select a language yet, so from there: open Transform (the More ⋯ menu, or a middle-strip button), switch Language to jq, and paste the query above.

Frequently asked questions

Is this really jq, or a JavaScript reimplementation of it?

It's real jq 1.8.2, compiled from its own C source to WebAssembly — not a JavaScript port that approximates jq's behavior. A program that works in your terminal's jq works here, and error messages are jq's own.

Does the no-code query wizard generate jq for me?

No. The wizard generates JMESPath only — jq queries are typed by hand. If you select jq as the language, the wizard says so rather than silently building something else.

Does jq support cost anything if I never use it?

No. The jq engine is a separate chunk that only downloads the first time you actually run a jq query — if you stick to JMESPath or never open Transform at all, it's never fetched.

What happens if my jq query runs forever?

You can cancel it. Long-running programs are backed by a real worker termination, not a cooperative flag a runaway loop could ignore — verified against a query written to spin for tens of millions of iterations.

Need a click-to-path helper instead of writing jq by hand? See JSON Path Finder.