Toolstia / JSONPath tester
JSONPath tester
Paste JSON, type a JSONPath expression and see exactly what it matches. Each result shows its full path, so you can check that your query is selecting what you expect.
Supported: $ root, .name, ['name'], [0], [-1], [*], .., slices like [1:3], lists like [0,2] and simple filters like [?(@.price < 10)] or [?(@.isbn)]. Filters with && or || are not supported.
How it works
- Paste your JSON into the box.
- Type an expression such as $.store.book[*].title.
- Read the matches, or copy them as a JSON array.
Common expressions
$ is the root, .name picks a key, [0] picks an item, [*] picks all items and .. searches at any depth, so $..price finds every price.
Slices and lists
[1:3] takes items 1 and 2, [-1:] takes the last item, [::2] takes every second item and [0,2] picks items 0 and 2.
Filters
A filter such as [?(@.price < 10)] keeps items that pass the test, and [?(@.isbn)] keeps items that have an isbn key. Combining conditions with && or || is not supported.
Dialects differ
JSONPath was never fully standardised, so tools differ in small ways. This one follows the common Goessner style used by most libraries.
Questions
Is this the same as jq?
No. jq is a different query language. JSONPath expressions start with $.
Why no matches?
Check the key names and capital letters, and make sure array items use [*] or an index.
Is my JSON uploaded?
Everything happens in your browser, and nothing you enter is sent anywhere.