Skip to content
Tools

JSONPath Tester

Evaluate JSONPath expressions against your JSON and see matches instantly.

Local
Matches

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.
  • .name or ['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.
  • ..name recursive descent to every name at any depth.
  • [?(@.price < 10)] filters with == != < <= > >=, existence tests and && / ||.

How to use it

  1. Paste your JSON into the input panel.
  2. Type a JSONPath expression in the field at the top.
  3. Matches update as you type, each with its full path.
  4. 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.

Feedback welcome

Found a bug in this tool, or want it to do something it does not? Tell us and we will take a look.