JSONPath Tester
Evaluate JSONPath expressions against your JSON and see matches instantly.
This tool needs JavaScript enabled to run in your browser.
What this tool does
The JSONPath Tester evaluates a JSONPath expression against the JSON you provide and lists every value that matches, together with the path to each one. It is handy for working out the right expression to pull a field out of an API response before you use it in a test assertion.
Supported syntax
$the root element..nameor['name']a child property..*or[*]every child or array element.[0],[0,2],[-1]array index and index union.[1:4],[::2]array slices with an optional step...namerecursive descent to everynameat any depth.[?(@.price < 10)]filters with== != < <= > >=, existence tests and&&/||.
How to use it
- Paste your JSON into the input panel.
- Type a JSONPath expression in the field at the top.
- Matches update as you type, each with its full path.
- Copy the matched values as a JSON array.
Common use cases
- Finding the exact path to assert on in an API test.
- Pulling every price, id or title out of a nested response.
- Filtering a list down to the items that meet a condition.
Different JSONPath libraries differ at the edges. This tester covers the widely shared core syntax; when you move your expression into a specific library, check that library's notes on filters and the behaviour of the root in a filter context.
Frequently asked questions
- Which JSONPath syntax is supported?
- Dot and bracket child access, wildcards (*), array indexes and slices, recursive descent (..) and simple filter expressions such as [?(@.price < 10)].
- Does it run my JSON against a remote service?
- No. The expression is evaluated locally in your browser against the JSON you paste in.
Learning resources
Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.