Run jq filters on JSON in the browser.
The jq Playground runs real jq filters against JSON you paste in. The result updates as you type, and four checkboxes mirror the common command-line flags. It is a convenient place to build and test a filter before using it in a shell script.
jq is a command-line tool for slicing, filtering and transforming JSON, often described as sed for JSON. A jq program is a filter: it takes JSON in and produces zero or more JSON values out. The simplest filter is a single dot, which returns the input unchanged. You can pick fields with .name, iterate arrays with .[], select items with select(condition), build new objects with {name, age}, and chain steps with the pipe character. Functions such as map, add, length, keys, sort_by and group_by cover common needs. This tool runs the actual jq program compiled to WebAssembly, so filter syntax and error messages match the command line. Each output value is printed on its own line, pretty-printed by default.
No. jq runs in your page as WebAssembly, and the JSON and filter stay in the browser.
Four: -c compact output, -r raw strings, -S sort keys and -s slurp. Other command-line flags such as --arg are not available in this tool.
jq emits one output per value the filter produces. A filter like .users[].name produces one result per user, each on its own line.
Multiple results are printed one after another, and with Raw strings (-r) strings lose their quotes. Wrap results in an array, for example [.users[].name], to get a single JSON document.
Input up to 2 MB. Output past 2,000,000 characters is truncated and a warning is shown.
jq reads a stream of JSON values, so lines of separate JSON values are processed one by one. Tick Slurp inputs (-s) to collect them into one array.