Collapsible, searchable tree view that stays fast on large files
JSONPath Tester
Work out the right JSONPath for an API response, a config lookup or a test assertion while you type.
Loading tool…
How to use jsonpath tester
Paste JSON or load the sample.
Type a JSONPath starting with $, or click an example to start from.
Read the matches as values, as normalised paths, or both.
Copy or download the result.
What this tool does
- Dot and bracket names, negative indexes, slices with steps, wildcards and recursive descent (..).
- Filters with ==, !=, <, <=, >, >=, regex =~, &&, ||, !, parentheses and length().
- Normalised paths such as $['store']['books'][2] for every match.
- Errors name the column where the query stops making sense.
How the result is verified
Each match's normalised path is run again on its own and must land on exactly the same value.
Frequently asked questions
How do I get the last item of an array?
Use [-1] for the item itself or [-1:] for a one-item list. Both work without script expressions.
Why does my filter match nothing?
A filter runs on each child of the list, so @ is one item. Write $.books[?(@.price < 10)], not $[?(@.books.price < 10)], and quote strings: @.author == 'Ana'.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Beautify or minify JSON with your choice of indentation
Nested JSON to one level of dot path keys, and back
TypeScript interfaces from a JSON sample, with optional keys