JSONPath Tester
This JSONPath tester lets you write an expression and see the matches immediately, which is the only practical way to get a non-trivial one right. JSONPath is to JSON what XPath is to XML: the dollar sign is the root, a dot walks into a property, [*] takes every element of an array, and a double dot searches at any depth without you having to know the structure. Filter expressions such as [?(@.price > 10)] select by value, which is what makes it genuinely useful rather than just a shorter way to write property access. You can switch the output to show the path of each match instead of its value.
How it works
JSONPath is to JSON what XPath is to XML: an expression language for selecting parts of a document. $ is the root, a dot walks into a property, [*] takes every element and .. searches at any depth.
Filter expressions such as [?(@.price > 10)] select by value, which is what makes it far more useful than walking a document by hand. Switch the output to paths to see where each match came from.
Everything runs in your browser — nothing you paste is sent to a server.
The syntax, briefly
| Expression | Meaning |
|---|---|
$ | The root of the document |
$.store | The store property |
$.book[0] | The first element |
$.book[*] | Every element |
$.book[-1:] | The last element |
$..price | Every price at any depth |
$..book[?(@.price<10)] | Books cheaper than 10 |
$..* | Everything in the document |
Why test interactively
JSONPath expressions fail silently. An expression with a typo returns an empty result rather than an error, which in code looks exactly like "there is no matching data". Seeing the matches as you type is the difference between finding that in seconds and finding it in production.
Frequently asked questions
How do I use JSONPath?
Paste your JSON, then type an expression such as $.store.book[*].title. The matches appear on the right as you type.
What does the double dot do?
It searches at any depth. $..price finds every price anywhere in the document, however deeply nested, without you needing to know the structure first.
How do filters work?
A filter is written [?(@.price > 10)] where @ refers to the current element. It keeps only the elements where the condition is true, so you can select by value rather than by position.
Why show paths instead of values?
When a match is not what you expected, the path tells you where it actually came from. It is also what you need if you intend to write back to those locations.
What if nothing matches?
You get an empty array and a note saying the expression was valid but matched nothing — which distinguishes a wrong expression from a wrong assumption about the data.
Is my JSON uploaded?
No. The expression is evaluated entirely in your browser.
Related tools
JSON Viewer
This JSON viewer renders any document as a collapsible tree so you can explore large payloads without scrolling.
JSON Formatter & Beautifier
This JSON formatter beautifies minified or messy JSON online with clean indentation, line numbers, and code folding.
XPath Tester
This XPath tester evaluates an expression against your XML using the browser engine.