JSONPath Tester
Test JSONPath expressions online against your JSON with live results. Supports filters, wildcards, recursive descent, slices and unions, and shows the path of every match.
Runs in your browser · Nothing uploaded · No sign-up
Something not working, or missing a feature? Send feedback
About the JSONPath Tester
The JSONPath Tester evaluates a JSONPath expression against your JSON as you type and lists every match with its full path. It supports filters like [?(@.price < 10)], wildcards, recursive descent (..), slices, unions and regular expressions, and it points to the exact position of a mistake in the expression.
Everything runs in your browser, so your input is never uploaded to a server.
How to use the JSONPath Tester
- Paste or open the JSON document in the left editor.
- Type a JSONPath expression starting with $, or click one of the examples.
- Read the matches on the right, each with its normalised path, and copy the values as a JSON array.
Examples
Input
$.store.book[?(@.price < 10)].title
Result
[ "Sayings of the Century", "Moby Dick" ]
Run against the sample document. Each match is also listed with its path, such as $['store']['book'][0]['title'].
Input
$..price
Result
[ 8.95, 12.99, 8.99, 22.99, 399 ]
The .. operator searches the whole document, so the bicycle price is found as well as the book prices.
Common mistakes
- Forgetting the $. Every expression starts at the root with $. store.book fails; $.store.book works.
- Filtering the wrong level. [?(...)] tests the children of the node it follows. To filter books, put it after book, not after store.
- Expecting one value. JSONPath always returns a list of matches, even for a single result. Use the first match when you only expect one, and handle an empty list when nothing is found.
- Library differences. Implementations differ on filter details and on results for missing keys. Use this tool to check the logic, then test with the library you ship.
Works well with the JSONPath Tester
- JSON Viewer: explore the structure as a tree and copy a path.
- JSON Formatter: format the document before you write the path.
- JSON Flatten / Unflatten: turn the structure into path keys to see every path at once.
Frequently asked questions
Which JSONPath syntax is supported?
The common core of RFC 9535 and the original Goessner syntax: $, .name, ['name'], [0], [-1], [*], .., unions like [0,2], slices like [1:4:2], and filters with ==, !=, <, <=, >, >=, !, && and ||. A =~ /regex/ match is supported as an extension.
Why does my filter return nothing?
Filters apply to the children of the node before them, so write $.store.book[?(@.price < 10)], not $.store[?(@.price < 10)]. Also compare like with like: the string "10" is not less than the number 20.
Does it run my expression with eval?
No. The expression is parsed by a small interpreter in the page, so nothing from your JSON or your expression is ever executed as code, and nothing is uploaded.
What does the path next to each match mean?
It is the normalised path of that value, with every step in brackets. It identifies the match uniquely, so you can reuse it as a plain path in code or compare it with a result from another tool.
Related tools
JSON Viewer
View JSON online as a collapsible tree with value types, item counts and copyable paths. Explore large API responses without scrolling through raw text.
HTML Viewer
Free online HTML viewer: paste HTML code and see it rendered live in a secure sandboxed preview. Check snippets, emails and templates with scripts off.
Markdown Viewer
Preview GitHub-flavoured Markdown online as you type, with sanitised HTML output. Check READMEs, docs and notes before you publish them.
JSON Formatter
Format and beautify JSON with configurable indentation and optional key sorting. Errors are reported with exact line and column.
HTML Formatter
Format and beautify messy or minified HTML into clean, indented markup with Prettier, including embedded CSS and JavaScript. Runs locally in your browser.
CSS Formatter
Format and beautify CSS, SCSS and Less online with Prettier. Turn minified or messy stylesheets into readable, consistently indented code in your browser.