About the JSONPath tester
JSONPath is a query language for picking values out of JSON, much like XPath does for XML. Since 2024 it is an official standard, RFC 9535. This tester implements that standard and passes the official JSONPath Compliance Test Suite.
Type a query and see the matches instantly. They appear as a list of values or as normalized paths ($['store']['book'][0]), and are highlighted in the input.
Syntax at a glance
| Expression | Meaning |
|---|---|
$ |
the root of the document |
.name or ['name'] |
a member of an object |
[0], [-1] |
an array element (negative counts from the end) |
[1:3], [::2] |
a slice (start : end : step) |
* |
all children |
.. |
descendants at any depth |
[[email protected] < 10] |
a filter; @ is the current item |
length(), count(), match(), search(), value() |
standard functions |
Coming from older JSONPath libraries?
Some older libraries accept script expressions such as $..book[(@.length-1)]. These evaluate JavaScript, are not part of the standard, and have caused security bugs. Use $..book[-1] instead. Filters like [?(@.price < 10)] still work, because the parentheses are ordinary grouping.
Is my data safe?
Yes. Queries run entirely in your browser, and numbers are compared exactly, so even very large integers are handled correctly.