JSONPath Tester
Paste JSON, type a JSONPath expression and see every match together with its exact path. Wildcards, recursive descent, slices, unions and simple filters are supported.
Runs in your browser. Your files are never uploaded.
Loading JSONPath Tester…
How to use JSONPath Tester
- Paste your JSON document into the left box, or press Load sample.
- Type a JSONPath expression such as $.store.book[*].title in the expression field.
- Read the matches on the right; each shows its normalised path and value.
- Use Copy values to copy the matched values as a JSON array.
What JSONPath is
JSONPath is a query language for JSON, modelled on XPath for XML. Instead of writing loops to dig through nested data, you describe where the values live and the engine returns every match. It is used in API testing tools, workflow automation platforms, log pipelines, Kubernetes tooling and many libraries for different languages.
An expression always starts with $, the root of the document. From there you chain steps: a dot and a key to enter an object, square brackets for array positions or quoted keys, an asterisk for everything at that level, and two dots to search at any depth.
Quick syntax reference
- $.store.book[0] selects the first book.
- $.store.book[-1] selects the last one.
- $.store.book[*].title selects every title.
- $..price finds every price anywhere in the document.
- $.items[1:3] selects the second and third items; the end index is not included.
- $['first name'] reads a key that contains a space.
- $.items[?(@.price < 10)] keeps items that match the condition.
- $.items[?(@.a == 1 || @.b == 2)] combines conditions.
Tips and limits
If an expression returns nothing, check key spelling and case first, then try $..key to find where the key actually lives. Comparisons only succeed when both sides have the same type, so a price stored as the string "8" will not satisfy @.price > 5. Recursive descent over very large documents can produce many matches; the tester stops with a message after 20,000.
This tool is for learning and debugging expressions. Before relying on an expression in production, confirm it with your own JSONPath library, since filter details and error behaviour differ between implementations. The page does not send your JSON anywhere.
Why use this jsonpath tester tool
- Matches with paths. Each result shows where in the document it was found, not just its value.
- Filters. Use expressions such as [?(@.price > 10 && @.stock)] with comparison and logical operators.
- Clear syntax list. The supported syntax is documented right on the page, so you know what will and will not work.
- Runs locally. Evaluation happens in your browser; the JSON is never uploaded.
Frequently asked questions
Which JSONPath syntax is supported?
The root $, child access with .key and ['key'], array indexes including negative ones, [*] and .* wildcards, .. recursive descent, [start:end:step] slices, [a,b] unions and filters [?(...)] using == != < <= > >=, &&, || and !. Script expressions, functions such as length() or match(), and regular expressions are not supported.
Why do different JSONPath tools give different answers?
JSONPath was a loose proposal for many years, and implementations disagree on edge cases such as filters on missing keys. A formal standard (RFC 9535) now exists, but older libraries still behave differently. This tester follows common conventions; always test against the library you use in production.
How do I filter on a nested field?
Use a path inside the filter, for example $.orders[?(@.customer.country == 'IN')]. The @ symbol stands for the item currently being tested, and you can follow it with dots or brackets.
More free tools
JSON Formatter
Format, validate, beautify and minify JSON instantly. Shows the exact line and column of any error. Free and runs in your browser.
Open toolJSON to CSV
Convert a JSON array to CSV in your browser. Flattens nested objects, picks delimiters and downloads a ready .csv for Excel or Sheets.
Open toolCSV to JSON
Convert CSV to JSON in your browser. Auto-detects delimiter, uses the header row as keys, and can convert numbers and booleans.
Open tool