About JSONPath queries
Paste JSON on the left, write a JSONPath in the path row, then click Query. Matches always come back as one JSON array in the results pane. Nothing runs while you type—only the button triggers a query.
Invalid JSON shows a line hint under the input. A bad path shows an error under the path field. An empty match set is still success: the array is [].
JSONPath — background
Paths and RFC 9535
JSONPath selects values inside parsed JSON. $ is the root. $.store.book[0].title reads one field; [*] walks every element; $..price finds a name at any depth. Filters such as [?@.price<10] keep rows that pass a test.
One array for every hit
The tool always returns a JSON array, even for a single match or for $. wrapping the whole document. Copy from the header icon or by clicking the formatted result.
Slices, unions, and functions
- Array slices like [0:2] and unions like [0,2] follow the standard grammar.
- Inside filters you can use length(), count(), match(), search(), and value().
- Unicode escapes in the source JSON stay escaped in output; literal characters stay literal.
What this page is not
It does not rewrite the document like JSON flatten. To click the tree and copy a path, use the JSONPath generator. To pretty-print first, use JSON formatter.
Typical use
Pull ids from an API response
Paste the body, run $.items[*].id, and copy the array into a script or ticket.
Check a filter before production
Try $.records[?@.status=="active"].email on sample JSON to see every email that would match.