About the JSON Path Tester
JSONPath is a query language for picking values out of JSON, a bit like XPath for XML. Paste your JSON, type an expression and this tester shows every match straight away, together with the path to each one. It supports the child operator, bracket notation, wildcards, recursive descent with .., array indexes including negative ones, slices, unions and filter expressions such as ?(@.price < 10) with and/or conditions and regex matching. It is handy for debugging queries before you put them into a tool such as Postman, an automation workflow or your own code. Everything runs in your browser.
Updated October 2026
How to use the JSON Path Tester
- 1Paste your JSON into the left box.
- 2Type a JSONPath expression starting with $.
- 3Read the matching values on the right.
- 4Check the paths under the result to see where each match was found.
- 5Adjust the expression until you get exactly what you want.
Reading an expression
Take $.store.book[?(@.price < 10)].title. It starts at the root, goes into store, then into the book list. The filter keeps the books cheaper than ten, and the last step takes the title of each. If three books qualify you get three strings back.
The paths shown under the result use bracket notation and tell you exactly where each match sits, which helps when you need to update or remove that value in code.
Filters are the most powerful part. Inside [?( )] the symbol @ stands for the current item, so @.price reads its price key. You can compare with numbers, strings in quotes, true, false and null, and join checks with && and ||. A check with only @.key keeps items where that key exists and is not empty.
Useful patterns
- $.items[*].id lists the id of every item.
- $..name finds every name at any depth.
- $.users[?(@.active == true)] keeps the active users.
- $.users[?(@.email =~ /@example\.com$/)] uses a regular expression.
- $.items[0:5] takes the first five items.
- $['first-name'] reads a key with a dash.
Related tools
If your JSON has a syntax error, fix it first with the JSON Validator and tidy it with the JSON Formatter. To turn selected data into a table, send it through the JSON to CSV Converter, and to shape a sample into types use the JSON to TypeScript Converter. For text searches of another kind, try the Regex Tester.
Features
- Child, bracket, wildcard and recursive descent
- Array index, negative index, slice and union
- Filters with comparison, and, or and regex
- Matched values and their paths
- Clear errors for bad expressions or JSON
- Private, no upload
Frequently asked questions
What is JSONPath?
It is a syntax for selecting parts of a JSON document. $ is the root, a dot goes into an object key, and square brackets select array items or keys with special characters.
How do filters work?
A filter such as [?(@.price < 10)] keeps the items for which the condition is true. @ means the current item. Combine conditions with && and ||.
What does .. do?
Two dots search at any depth. $..price finds every key named price anywhere in the document.
How do I pick the last item?
Use a negative index: $.items[-1] returns the last element of the items array.
How do slices work?
[0:2] gives the first two items, [1:] skips the first and [::2] takes every second item, like slicing in Python.
Why do I get no match?
Check key spelling and case, and make sure each part of the path exists. A missing key returns an empty list rather than an error.
Are all JSONPath dialects the same?
No. Libraries differ in small details, such as filter syntax. If you move to another tool, check its documentation for the differences.