JSONPath tester and query builder
Write a JSONPath expression and see the matches update as you type, against your own document — with a visual builder for filters, sorting and field selection when you would rather not write the expression by hand.
Two ways to ask
- Write the expression
- The explorer evaluates as you type and lists every match with its path, its type and a preview of its value. An invalid expression is reported as a message rather than as an empty result, because half-typed expressions are the normal state while you are writing one.
- Build it
- Pick a source path, then add filters with real operators — equals, contains, greater than, between, in, matches regex, exists — plus sorting, field selection and a row limit. The field names are suggested from your own data.
Syntax it supports
| Syntax | Meaning | Example |
|---|---|---|
| $ | The document root | $ |
| .key | A named child | $.store |
| ['key'] | A child whose name needs quoting | $['first name'] |
| ..key | That key at any depth | $..price |
| [n] | The item at index n | $.books[0] |
| [a:b] | A slice | $.books[0:3] |
| [*] | Every item | $.books[*].title |
| [?(@.k)] | Items that have the key | $.books[?(@.isbn)] |
| [?(@.k > n)] | Compare a field | $.books[?(@.price < 10)] |
| && || | Combine conditions | $.books[?(@.price < 10 && @.inStock)] |
Filter expressions are not eval
A JSONPath filter like [?(@.price > 15)] is code, and the usual way to run it is to hand the text box contents to the JavaScript engine. This evaluates filters through a restricted parser instead, so the expressions work without your typing becoming a script that runs.
What you can do with the results
- Export as JSON, or as CSV when the results are tabular
- Open the results as a new file to keep working with them
- Save a query by name, and pin the ones you use often
- Share a query as a link — the whole query travels in the URL, because there is no server to store it on
- Matching nodes light up in the graph view, so a query is also a way to point at part of a diagram
Questions
How do I test a JSONPath expression?
Open your JSON in fileviewer.dev, switch to the Query view and open the explorer tab. Type the expression and the matches appear as you type, each with its path, type and value.
Which JSONPath syntax is supported?
The constructs jsonpath-plus supports: root, child and recursive descent, wildcards, index and slice notation, and filter expressions with comparisons and boolean operators. The built-in reference lists each one with a working example, so nothing is documented that the tool would then reject.
Can I query without writing JSONPath?
Yes. The builder gives you a source path, filter rows with real operators, sorting, field selection and a limit — with field names suggested from your own data. It produces the same results as an expression would.
Is my JSON uploaded to run the query?
No. Queries run in your browser against the document you loaded. Saved queries are stored on your device, and a shared query link carries the expression, never your data.