JSONPath Tester
Query JSON with a JSONPath expression and see the matching values instantly. Try $.users[*].name on the sample. Supports child access, array indexes, slices, wildcards [*] and recursive descent ...
Test JSONPath expressions
JSONPath is a compact query language for JSON β the equivalent of XPath for XML. Instead of writing code to walk a nested structure, you write a path like $.users[*].email and get every matching value back. This tester evaluates your expression against the JSON you paste and shows the matches instantly, so you can build and debug a path before dropping it into your application or a tool like jq.
How to use it
- Paste your JSON into the input box (or load the sample).
- Type a JSONPath expression in the JSONPath field.
- The matching values appear on the right as you type.
Common expressions
$.users[*].nameβ the name of every user.$.users[0]β the first user object.$.users[-1]β the last user.$.users[0:2]β the first two users (a slice).$..idβ everyidanywhere in the document.
When you would reach for it
Pulling a handful of fields out of a large API response, verifying the path your code uses actually matches, or exploring an unfamiliar payload. For richer transformations use the jq playground or JSONata playground; to see the whole document in a tree, open the JSON editor.
Privacy
Every query runs locally in your browser and works offline once loaded. Your JSON is never uploaded or stored, so it is safe to test against real data.
Frequently asked questions
Which JSONPath features are supported?
Root $, dot and bracket child access, array indexes (including negative), slices [start:end], wildcards [*] / .*, and recursive descent ... Filter expressions like [?(@.x>1)] are not supported.
What is the difference between dot and bracket notation?
They are equivalent for simple keys: $.user.name and $['user']['name'] match the same value. Use bracket notation when a key contains spaces, dots or other characters that are not valid in dot notation.
How do I select every element of an array?
Use a wildcard: $.users[*] returns every element, and $.users[*].name returns the name of each. To grab one element use its index, for example $.users[0] or $.users[-1] for the last.
What does recursive descent do?
.. searches at any depth. $..id returns every id anywhere in the document, which is handy when the same key appears at different nesting levels.
Why does my query return nothing?
Usually a typo in a key name, a wrong array index, or expecting a filter the tester does not support. Build the path up one segment at a time β start with $, then add each level β to see where it stops matching.
Is my data uploaded?
No β the query runs entirely in your browser; nothing is sent to a server.