Skip to content
toolgrid

No tool found. Try another word.

JSONPath Tester

Test JSONPath expressions against your JSON and see every match with its path. Filters, wildcards, recursive descent and slices, with clickable examples.

results

JSONPath expressionValue

Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.

How to use the JSONPath Tester

  1. 1 Paste your JSON (or load the bookstore sample).
  2. 2 Type a JSONPath expression, or click one of the examples.
  3. 3 See the matching values and their paths; copy the results as JSON.

About the JSONPath Tester

JSONPath is a query language for JSON, comparable to XPath for XML. An expression starts at the root ($) and walks down with .key or ['key'], [n] for array items, * for all children, .. for every level below, [start:end] for slices and [?(…)] for filters.

The tester evaluates your expression with the jsonpath-plus library and lists every match with its normalized path, such as $['store']['book'][2]['title'], so you can see exactly where each value comes from. The combined result is shown as a JSON array, ready to copy.

JSONPath is used in API testing tools (Postman, Karate), Kubernetes (kubectl -o jsonpath), AWS Step Functions and many logging and monitoring tools. Implementations differ slightly in filter syntax; RFC 9535 (2024) now standardizes the language, and the common expressions shown here work the same everywhere.

Frequently asked questions

What does $..author mean?

The .. operator searches recursively: $..author finds every "author" key at any depth in the document.

How do filters work?

Inside [?( )] the @ stands for the current item: $..book[?(@.price < 10)] keeps the books whose price is below 10. You can use comparisons, && and ||.

How do I get the last item of an array?

Use a negative slice: $..book[-1:] returns the last book, [-2:] the last two.

Why do I get no results?

Keys are case-sensitive, and paths start at $. Check whether the value is inside an array; then you need [*] or an index before the next key.