About
Tool No. 67 of Pikkola
A JSON document is a shape. A query is a question about that shape, and the answer is rarely the whole document. This page keeps the shape on the left and the question above the answer, and evaluates the question in the tab.
What it does
Paste a document and write a query in one of two languages. jq gets a filter: fields, iteration, select, constructors, arithmetic, sorting, grouping and the list and string functions. JSONPath gets a path: children, recursive descent, wildcards, unions, slices and filters. The result appears as you type, with a count, a type summary and four ways to take it away: JSON, CSV, TSV and a CLI line.
Four documents come built in, shaped like the services they name: a GitHub repository list, an ecommerce order export, a Kubernetes PodList and a GA4 event export. They are there so a visitor can hear the tool answer before pasting anything private.
What jq means here
jq is a language in which every filter is a function from one value to a stream of values. That is why .[] turns an array into many results, why a pipe feeds each result to the next filter, and why select can drop a value entirely. The page keeps that model: the engine returns a list of outputs, even when the list holds one item.
It is not jq itself. It is an interpreter written in JavaScript for this page: a tokenizer, a recursive descent parser and a tree walker. Nothing is passed to eval or to the Function constructor, and the page's content policy would refuse them. The subset is listed on the studio page and in the cheat sheet, and it covers the filters most queries actually use. Definitions with def, foreach, label, the streaming builtins and the regex functions are outside it; a query that uses one stops and names it.
Where a query is inside the subset, its output is compared with jq 1.7 in the build: the same document, the same query, the same stream. The comparison is not a claim that every corner of jq behaves the same. It is a guard against the drift that a hand written interpreter gets when nobody checks it.
What JSONPath means here
JSONPath has several dialects, and they disagree about filters, functions and the meaning of a missing key. This page follows the common Goessner style: $ is the root, . and ['name'] go down, .. descends recursively, * takes every child, and a bracket takes an index, a union, a slice or a filter such as [?(@.price < 10)]. Filters support comparisons, &&, ||, !, existence tests and =~ /regex/. A path may end in length(), count(), min(), max(), sum() or avg().
JSONPath returns values, not a rebuilt document. When the values need to become a new shape, that is the point at which jq is the shorter answer, and the toggle is one click away.
Errors and limits
Every token keeps its position, so a parse error points at a line and a column and the page draws the caret under it. A runtime error, such as indexing a string with a name, points at the node that caused it. The message is in the engine's own words, because a translated error is harder to search for.
A query is stopped after a fixed number of evaluation steps, and a stream is capped at fifty thousand values. Both limits exist to keep a browser tab alive: a query that walks a million records with a bare dot would otherwise freeze the page before it could show anything. The limit that was reached is named in the message.
Privacy
The document is read by the browser, parsed by a script on this domain, and kept in memory for the life of the tab. It is never uploaded and never written to storage. The only things stored are the interface language, the theme and the last mode and sample, in localStorage, and they can be removed by clearing site data. The privacy note has the detail.
Questions or a query that should work and does not: hello@pikkola.com.