Skip to content
AZ Tools

JSONPath Tester

Run JSONPath queries ($.store.book[*].author, $..price) against a sample document and see the matching values.

Try:

Matches (3 matches)

[
  "Evelyn Waugh",
  "Herman Melville",
  "Nigel Rees"
]

Supports the root $, child .key, recursive descent ..key, indexes [n] and [-1], the wildcard [*] and bracket notation ['key']. Filters and slices aren't supported — use jq for those.

How to use

  1. Paste your JSON in the top box (the default sample works as a starting point).
  2. Write a JSONPath expression — click an example chip if you're not sure.
  3. Read off the matched values, or copy them as a JSON array.

About this tool

Show

Paste a JSON document and a JSONPath expression. The tool evaluates the path against the document and shows every matching value as a JSON array. Supports the common subset: $ root, .key dot navigation, [n] index (positive and negative), [*] wildcard, .. recursive descent, and ['key'] bracket-quoted keys. Useful for sanity-checking a JSONPath before pasting it into jq, Bruno, Postman, k6, or a CloudWatch query.

That subset is deliberate and it is worth knowing where it stops. Filter expressions like $.items[?(@.price > 10)], array slices like [1:3] and unions like [0,2] are not implemented and are reported as an unsupported bracket expression rather than silently returning nothing. Dot navigation also only accepts identifier-shaped names, so a key with a space or a hyphen has to be written in the bracket-quoted form.

The wider problem is that JSONPath was a blog post for twenty years before RFC 9535 standardised it in 2024, and the implementations that grew up in between do not agree. The order results come back in, whether a recursive descent visits a node before or after its children, what a filter does with a missing property, and whether the result is a flat list or a set of node references all vary by library. A path that behaves one way here can behave differently in the tool you paste it into, which is exactly why checking the shape of the result first is worth the detour.

A match of nothing and a match of null look different in the output but mean different things: an empty array means the path selected no nodes, while [null] means it selected one node whose value happens to be null. Reading the first as the second is a common source of confusion when a path is being used to assert that a field is absent.

Everything is evaluated in the page on the document you paste. Nothing is sent anywhere, which matters when the document is a production API response.

Frequently asked questions

What JSONPath dialect is this?

A practical subset of the Goessner / RFC 9535 syntax — root $, child .key, recursive .., index [n], wildcard *, and quoted keys ['x']. Filter expressions ([?(@.price < 10)]), slices ([0:2]), unions ([0,2]), and script expressions are not supported. Use jq for those.

Why does my path return nothing?

Common causes: typos in key names (JSONPath is case-sensitive), the field is missing on some items (recursive .. skips silently rather than erroring), or the input isn't valid JSON. Try a simpler path first to confirm the data is what you expect.

Does $..price find prices at every depth?

Yes — .. is recursive descent and price then filters to nodes that have a price key. It returns the values, not the objects containing them. To get the containers, use $..* and filter mentally.

Can I run this against a large API response?

Yes locally — parsing and walking is fast for documents up to a few MB. For real APIs you'd typically use jq on the command line or Bruno/Postman's built-in JSONPath; this tester is for iterating on the expression itself before you commit it.

Related tools