JSONPath Tester
Test JSONPath queries against your JSON and see the matching values or their paths.
Runs in your browser Your input never leaves your device.
Supports RFC 9535 syntax: $ root, .name, ['name'], [0], [-1], [*], .. recursive, [1:3] slices, [0,2] unions and [?(@.price < 10 && @.a == 'x')] filters with length(). Regular-expression functions are not supported. Nothing is uploaded and no code from your query is executed.
Report a problem with this tool
About this tool
JSONPath is a query language for picking values out of a JSON document, like XPath for XML. Paste your JSON, type a query, and the tool lists every match, either as the values or as their normalized paths such as $['store']['book'][0]['title']. It supports the standard syntax from RFC 9535: the root $, dot and bracket names, array indexes including negative ones, the wildcard *, recursive descent .., slices like [1:3] or [::-1], unions like [0,2], and filters like [?(@.price < 10 && @.category == 'fiction')] with comparisons, && || ! and the length() function. The query is read by a parser and interpreted, never run as code, so it is safe to try anything. Regular-expression functions such as match() are not supported. A very large number of matches or deeply nested data is stopped with a message. Everything runs in your browser.
How to use it
- Paste your JSON on the left.
- Type a JSONPath query, or press an example.
- Switch between Values and Paths to see what matched.
- Press Copy to take the result as JSON.
Common problems
- The query returns no matches
- Check the spelling and the case of property names, and that you used the right level (try $..name to search at any depth).
- A filter matches nothing
- Inside [?( )] use @ for the current item, quote strings ('fiction'), and compare numbers to numbers: a number and a string never compare as equal or ordered.
- My tool gives different results
- JSONPath implementations disagree on edge cases. This one follows RFC 9535: for example, a missing property compares as nothing, not as null.