JSONPath Tester

Write a JSONPath query and see exactly what it matches, as you type.

Runs in your browser
JSON
Matches

How to use the JSONPath Tester

  1. Paste your JSON, open a file, or use the sample.
  2. Type a JSONPath expression starting with $, or click one of the examples.
  3. Matches appear instantly with their full path and value.
  4. Copy the matched values as JSON, or just the paths.

About this tool

JSONPath is a query language for picking values out of JSON, much as XPath does for XML. It turns up in API testing tools, monitoring and alerting rules, Kubernetes commands, data pipelines and many libraries. Getting an expression right by trial and error inside those tools is slow, so this tester shows the results live while you type.

It understands the full everyday syntax: dot and bracket names, indexes from the start or the end, slices with steps, unions such as [0,2], wildcards, and recursive descent with .. to search at any depth. Filters such as [?(@.price < 10 && @.isbn)] compare values with ==, !=, <, >, regular expressions with =~, combine conditions with && and ||, and can refer back to the root with $.

Each match shows the exact path where it was found, which helps when an expression catches more than you expected. Different tools implement JSONPath with small differences, so treat edge cases with care, but the common forms behave the same everywhere. The evaluator is written for this site and never runs your expression as code.

This tool runs entirely in your browser. What you type or open is never sent to a server.

Frequently asked questions

What is the difference between . and .. in JSONPath?

A single dot picks a child of the current node. Two dots search the current node and everything beneath it, so $..price finds every price at any depth.

How do I filter array items?

Use [?( )] with @ for the current item, for example $.items[?(@.stock > 0)]. Combine tests with && and ||, negate with !, and check that a key exists with @.key on its own.

How do I select the last item of an array?

Use a negative index: $.list[-1] is the last item and $.list[-2:] the last two.

Why does another tool give different results?

JSONPath was informally specified for years, so libraries differ on details such as filter syntax and result order. A standard (RFC 9535) now exists; this tester follows the widely used common syntax.

Is my JSON sent anywhere?

No. Queries run in your browser and nothing is uploaded. Your last document and expression are remembered locally.