JSONPath Tester

One input per line. Output is numbered to match the input order.
Pinned tools are listed in your favourites on the home page.Copies a link to this tool that carries your current input, so it opens ready to run.Gives you an iframe snippet for putting this tool on your own site.
JSON
Ctrl+Enter Run  · Ctrl+Shift+C Copy  · Esc Clear

Understand JSONPath Tester

JSONPath is a query language for JSON, and this tester runs an expression against your data and returns every value it matches.

How it works

An expression starts at $, the document root, and each step narrows the set of values carried forward: .name and ['name'] take a key, [2] takes an array element and a negative index counts from the end, * takes every child, ..name searches every level for that key, and [?(@.price < 10)] keeps the array elements whose field satisfies the comparison. The result is always a list, and an empty list is a valid answer rather than an error.

When to use it

  • Pulling one field out of a deeply nested API response without writing the traversal by hand.
  • Working out the right expression before putting it in a config file — Kubernetes, Jenkins, Postman tests, and many log tools accept JSONPath.
  • Counting how many items in a response satisfy a condition.
  • Finding every occurrence of a key when you do not know where in the document it lives.

Watch out for

  • A filter takes one comparison. [?(@.price < 10 && @.stock > 0)] is not supported, and filters apply to arrays — running one against an object matches nothing.
  • Slice syntax is not supported and fails quietly rather than loudly: [0:2] is read as index 0 and returns a single element.
  • Recursive descent finds more than you expect. $..id returns every id at every depth, including ones inside unrelated nested objects, in document order.
  • JSONPath had no formal standard until RFC 9535 in 2024, so implementations disagree on edge cases. An expression that works here can behave differently in Jayway, jsonpath-plus, or a cloud provider's query field — test it where it will actually run.

Not the right tool for: Transforming data. JSONPath selects values; reshaping them into a new document is what jq and JMESPath are for.

Frequently Asked Questions

What is the difference between $.store.book[*].title and $..title?

$.store.book[*].title traverses a specific path and gets titles from the book array. $..title uses recursive descent (..) to find ALL "title" keys anywhere in the document, at any nesting level. Recursive descent is powerful but can return unexpected results in complex documents.

How do filter expressions work?

Filter expressions use [?(@.key operator value)] syntax: $..book[?(@.price < 10)] finds all books with price under 10. Operators: == != < <= > >=. The @ symbol refers to the current element being evaluated.

Is JSONPath standardized?

JSONPath was proposed by Stefan Goessner in 2007 but had no formal standard until RFC 9535 (2024). Different implementations have subtle differences. This tool implements the common Goessner subset compatible with most libraries (jsonpath-plus, Jayway, json-path).

How to Use JSONPath Tester

  1. Paste or type your input in the input area above.
  2. The tool processes your input automatically or click Run.
  3. Copy or download the result using the action buttons.
  4. Use Ctrl+Enter to run quickly from the keyboard.