JSONPath Tester
Paste JSON, type a query and watch the matches light up as you type. Filters, wildcards, recursive search and slices all work. Nothing is uploaded.
How to use JSONPath Tester on KickSolve
Three quick steps, no account needed.
Why choose KickSolve
Built for speed, privacy and clean results.
What you can do with JSONPath Tester
Everything this tool is good for.
About JSONPath Tester on KickSolve
What it does, how it works and how to get the best results.
What is JSONPath?
JSONPath is a query language for JSON, similar to XPath for XML. A query starts with $ for the root and walks down through keys and indexes. It lets you select exactly the values you need from a larger document without writing code.
Supported syntax
$ root, .key or ['key'] child, ..key search at any depth, [*] all children, [0] and [-1] index, [0,2] union, [1:3] slice with an optional positive step, and [?( ... )] filters using ==, !=, <, <=, >, >=, &&, || and !. Inside a filter, @ means the current item.
Filters
A filter keeps the items for which the expression is true. For example $.store.book[?(@.price < 10 && @.isbn)] selects books under 10 that also have an isbn. Comparing values of different types is allowed but may not match as you expect, so keep comparisons to like types.
Dialect note
JSONPath has several implementations that differ in details. This tester follows the widely used syntax above and does not run script expressions, so a query that works here may need small changes in another library.
Related tools
Tidy your document first with the JSON Formatter. After selecting what you need, export it with JSON to CSV or generate types with JSON to TypeScript.
Worked example: filter with JSONPath
Using the built-in bookstore sample.
Query: $.store.book[?(@.price < 10)].title Matches (values): [ "Sayings of the Century", "Moby Dick" ] Matches (paths): $.store.book[0].title $.store.book[2].title
Two of the three books cost less than 10. Use the “List matches as” setting to switch between values and paths.
JSONPath syntax cheat sheet
The operators this tester supports.
| Query | Meaning | Example |
|---|---|---|
$ | Root of the document | $.store |
.key or ['key'] | Child by name | $.store['book'] |
..key | Search at any depth | $..price |
[*] | All children | $.store.book[*] |
[0], [-1] | By index, from the end with a minus | $.store.book[-1] |
[0,2] | Union of indexes or names | $.store.book[0,2] |
[1:3] | Slice | $.store.book[0:2] |
[?(...)] | Filter on the current item (@) | $..book[?(@.price > 10)] |
Frequently asked questions
Quick answers.
How do I test a JSONPath query?
Paste your JSON, type the query in the query box and the matches are highlighted immediately. The Matches box lists them.
What is the difference between $.. and $.?
A single dot selects a direct child. Two dots search at any depth, so $..price finds every price key wherever it is.
How do I filter an array?
Use a filter such as $.items[?(@.price < 10)]. Combine tests with && and ||, and negate with !.
Can I get the path of each match?
Yes. Set “List matches as” to Paths to see paths like $.store.book[0].title.
Why does my key with spaces fail?
Names with spaces or special characters must be quoted in brackets, for example $['first name'].
Is every JSONPath feature supported?
It covers the common syntax listed on the page. Script expressions and library-specific functions are not supported, and slice steps must be positive.
How do I format my JSON first?
Use the JSON Formatter and Validator, which also finds syntax errors.
Is my JSON uploaded?
No. Queries run in your browser and nothing is sent to a server.
More free tools from KickSolve
Related free tools. Each one runs in your browser too.