What this does
This is the real jq (version 1.8) compiled to WebAssembly and run in a background worker in your browser, not a reimplementation. Filters, built-in functions, reduce, def, regular expressions, and date functions behave as they do on the command line.
Options
- Compact (-c) prints each result on one line.
- Raw strings (-r) prints strings without JSON quotes, like
jq -r. - Sort keys (-S) orders object keys alphabetically.
- Slurp (-s) reads all input values into one array first.
Filters to try
.store.book[].title— Stream the title of every book.store.book | map(.price) | add— Sum the prices.store.book | map(select(.price < 10))— Keep books under 10.store.book | group_by(.category) | map({category: .[0].category, count: length})— Group and count[.. | numbers]— Collect every number at any depthto_entries | map(.key)— Keys of the top-level objectpaths(type == "number")— Paths that lead to numbers
Behavior notes
- The input may contain several JSON values one after another (for example newline-delimited JSON); jq runs the filter on each, or on the combined array with slurp.
- Syntax and runtime errors are shown with jq's own message. A filter that runs for more than five seconds is stopped by terminating the worker, so an accidental infinite loop does not freeze the page.
- Command-line features that touch the system are not available: there is no file access and no environment, and the
--argstyle flags are not exposed. Input and output are limited to 5 MB. - The WebAssembly module is about 0.9 MB and is downloaded the first time you run a filter.
Privacy
jq runs entirely in your browser. Your JSON and filters are never uploaded or stored.