What is JSONPath?
JSONPath is a query language for JSON, similar to XPath for XML. It allows you to extract specific values from complex JSON structures using path expressions like $.store.book[0].title or $..author. This tool evaluates JSONPath expressions against your JSON data entirely in the browser.
What JSONPath is
JSONPath is a query language for JSON, similar in spirit to what XPath is for XML. It lets you select values from a document with a compact expression — pull a single nested field, every element of an array, or all items that match a condition — without writing procedural code. This tester evaluates an expression against your JSON and shows the matched results instantly.
It is the fastest way to work out the exact path to a value inside a large or unfamiliar API response before you use that path in code or a configuration.
How JSONPath expressions are built
Expressions start at the root, written as $, and drill down with dot or bracket notation: $.store.book selects the book field, $.store.book[0] the first element, and $.store.book[*].title every book's title. Wildcards, array slices, and filter expressions let a single query reach across an entire collection.
JSONPath in tools you already use
JSONPath is not only a query language to learn in isolation; it powers features in tools you likely use — extracting fields in API testing suites, selecting values in CI and automation, and routing data in integration platforms. Getting an expression right here means it will work in those tools too.
How to test a JSONPath expression
- 1Paste your JSON. Provide the JSON document you want to query.
- 2Enter an expression. Write a JSONPath expression starting from the root $.
- 3Click Query. The values matched by the expression are shown so you can refine the path.
Examples
Select a nested field
Input
$.user.name on {"user":{"name":"Ada"}}Output
"Ada"
Every array element's field
Input
$.items[*].id on {"items":[{"id":1},{"id":2}]}Output
[1, 2]
Filter by condition
Input
$.items[?(@.price>10)]
Output
All items whose price is greater than 10
JSONPath syntax
The core operators.
| Expression | Selects |
|---|---|
| $ | The root element |
| .key | A child field |
| ['key'] | A child field (bracket form) |
| [0] | An array element by index |
| [*] | All elements |
| [start:end] | An array slice |
| ..key | A field at any depth (recursive) |
| [?(@.x>1)] | Elements matching a filter |
Frequently asked questions
What is JSONPath used for?+
Extracting specific values from a JSON document with a short expression — common in API testing, configuration, log processing, and data-integration tools.
What does the $ mean?+
It represents the root of the document. Every JSONPath expression starts there and drills down from it.
How do I select every item in an array?+
Use the wildcard [*], for example $.items[*].id to collect the id of every element in the items array.
Can I filter results by a condition?+
Yes. Filter expressions like [?(@.price>10)] select only the elements that satisfy the condition, where @ refers to the current element.
Is my JSON private?+
Yes. The document and query are evaluated in your browser and never sent to a server.
Is it free?+
Yes — free with no limits.
What does the recursive .. operator do?+
Two dots search at any depth, so $..price finds every price field anywhere in the document, however deeply nested.