JSONPath Tester & Evaluator
Developer ToolsPaste JSON, type a JSONPath expression, and see every matched value and its path live, with matches highlighted in the source.
Processed in your browser. A copy of each run is saved to your past runs so you can reopen it. Privacy
About
What the JSONPath Tester does
The JSONPath Tester evaluates a JSONPath expression against your JSON as you type. It lists the matched values or their normalized paths and highlights the matching lines in a formatted copy of the document. Filters such as ?(@.price < 10), wildcards and recursive descent are supported. Queries run in a background worker that is stopped after two seconds, so a heavy query cannot freeze the page.
Steps
How to use it
- 1Paste your JSON on the left, or load the bookstore example.
- 2Type a JSONPath expression, or pick one from Examples.
- 3Read the matches on the right; switch between Values and Paths.
- 4Copy the result, or check the highlighted source to see where each match sits.
Example
A real run
Input
$..book[?(@.price < 10)].title (on the bookstore document: four books and a bicycle)
Output
Values: [ "Sayings of the Century", "Moby Dick" ] Paths: $['store']['book'][0]['title'] $['store']['book'][2]['title']
The filter keeps books whose price is under 10 and returns their titles. Two of the four books match; Paths shows exactly where each title sits, and the source view shades those two lines.
Options
Every setting, and when to use it
- Values or Paths
- Values shows what matched, as a JSON array. Paths shows where each match lives, written as normalized paths like $['store']['book'][0]['title'], ready to paste into code or a bug report.
- Highlight matches in the source
- Shows the document formatted with line numbers and every matched node shaded, so you can see whether a filter caught the objects you expected. Shown for documents up to 2,000 formatted lines.
- Examples
- Common patterns on the classic bookstore document: every author, books under $10, the last book, books with an ISBN. Pick one to learn the syntax, then edit it.
Good to know
Common problems and limits
Documents up to 5 MB. Each query runs in a worker that is stopped after 2 seconds; the first 5,000 matches are shown.
Syntax follows RFC 9535 for the common parts: $, dot and bracket names, wildcards, .., slices, unions and ?() filters. Older script expressions such as $..book[(@.length-1)] are not supported, and filters run in a safe evaluator, never as JavaScript.
The JSON stays on this page; a ?path= link prefills only the expression. To reshape the data instead of selecting from it, format it first with the JSON Formatter.
Audience
Who uses it
- Backend and API developersWork out the expression for a log filter, an API gateway mapping or an AWS Step Functions path before putting it in config.
- QA and test engineersCheck the JSONPath assertions used in Postman, REST Assured or Karate against a real response.
- Data and integration teamsFind the path to the field you need in a large webhook payload, then describe the payload's shape with the JSON Schema Generator.
FAQ
Frequently asked
What is JSONPath?
A query language for selecting parts of a JSON document, the way XPath selects parts of XML. Stefan Goessner described it in 2007, and the IETF standardized it as RFC 9535 in February 2024. $ is the root, a dot or brackets step into a key, and the result is always a list of matches.
What do $, .., * and ?() mean?
$ is the whole document. .. searches every level below, so $..author finds authors anywhere. * matches every key or array item. ?() keeps only items whose filter is true, for example $..book[?(@.price < 10)], where @ is the item being tested.
Why does my filter return an array?
A JSONPath query always returns a list of matches, even when only one item matches or the filter is meant to pick a single object. Take the first element in your code, or tighten the expression so only one node can match.
What is the difference between JSONPath, jq and JSON Pointer?
JSON Pointer (RFC 6901) addresses exactly one value by path, like /store/book/0/title. JSONPath selects any number of values with wildcards and filters. jq is a full language that can also transform, compute and rebuild JSON, which JSONPath cannot.
Why do JSONPath libraries give different results?
Before RFC 9535 every library interpreted Goessner's article its own way, especially filters, script expressions and how results are wrapped. If a library disagrees with this page, check whether it follows RFC 9535 or the older behavior; expressions using only names, wildcards, slices and simple filters behave the same almost everywhere.
Is my JSON sent anywhere?
No. The document and the expression are evaluated in your browser, in a worker on this page. A copy of each query you run is saved to your past runs so you can reopen it, as described on the Privacy page.
Automation: an MCP tool query_jsonpath(json, path) → matches and an n8n node are planned for this tool.