Skip to main content

JSONPath Tester

Test JSONPath expressions against your JSON, including filters, slices, unions, wildcards and recursive matches. Runs locally in your browser.

JSON document

Stays in your browser
{
"users": [
{
"name": "Ada",
"role": "admin"
},
{
"name": "Grace",
"role": "editor"
}
]
}

No matches

[]

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to jq Playground, JSON Visualizer or JSON Parser.

Online JSONPath Tester

Paste JSON, write a JSONPath expression, and inspect matching values immediately. All parsing and matching stays in your browser. This is useful for API debugging and test data inspection when you need to query nested JSON instead of reading the whole document.

What this tool does and who uses it

JSONPath is a query notation for pulling specific values out of a JSON tree without reading the whole document. Two concrete uses: a developer debugging an API response who wants to pull every user's email out of a deeply-nested payload in one expression instead of scrolling through it, and a test engineer writing an assertion against one field of a large fixture (like an order total three levels deep) without hardcoding the full path in code.

Worked example

Against {"users": [{"name": "Ada", "role": "admin"}, {"name": "Grace", "role": "editor"}]}, the expression $.users[*].name matches ["Ada", "Grace"] — the wildcard selects every item in the users array, then .name reads that property from each. The recursive form $..name finds the same two values by searching every level of the document for a name key, which matters once your JSON has name nested at inconsistent depths.

Common mistakes and edge cases

  • Filters, slices and unions are supported. A filter that compares text needs quotes, for example [?(@.role=='admin')]; without quotes the expression is invalid.
  • An expression that doesn't start with $ is rejected outright with an explicit error, rather than being treated as relative to some other root.
  • Zero matches and invalid JSON look different in the result panel — check which one you're seeing before assuming the expression itself is wrong.

Frequently asked questions

Is JSONPath the same as JavaScript property access?
JSONPath is a query notation for JSON trees. This tester supports common expressions such as $.users[0].name, $.users[*].name, and $..name.
Does this JSONPath tester upload my data?
No. JSON parsing and path matching happen entirely in the browser. Nothing is sent to a server or saved.
What happens when no values match?
The result panel clearly reports that the expression returned no matches, which helps distinguish an empty result from invalid JSON or an invalid expression.
Does this tool support filter expressions like [?(@.price<10)]?
Yes. Filters such as $.items[?(@.price<10)], slices such as $.items[0:2], unions such as $["a","b"], wildcards and recursive descent (..) all work. Filters are evaluated by the JSONPath library in a safe mode that does not run arbitrary JavaScript.
What does an invalid expression look like?
You get a message that starts with "Invalid JSONPath", with the character where the problem was found when it is known. An expression that is valid but matches nothing shows "No matches" instead, which is not an error.
How do I query nested JSON values?
Start with $ for the root, then add .name for a property or [0] for an array index. Use [*] to take every item of an array and $..id to find a property at any depth. Try the expression on a small sample first: the matches list shows exactly which values were selected, so you can tell a wrong path from a missing value.

Related tools

More Formatters & Parsers

View all Formatters & Parsers tools →