JSONPath Tester
Query any JSON document with JSONPath expressions — results update live in your browser.
JSONPath expression
JSON input
Results (0)
Enter valid JSON and a JSONPath expression to see results.
JSONPath cheatsheet
$Root element.keyChild property..keyRecursive descent[*]All elements of array/object[n]Array element at index n[start:end]Array slice[?(@.k == v)]Filter: equality[?(@.price < 10)]Filter: comparisonAbout this tool
A browser-based JSONPath evaluator that runs expressions against any JSON document and shows matching nodes in real time. Supports child access, recursive descent, array slices, index access, and filter expressions — the full everyday subset of JSONPath.
How to use it
Quick steps to get the most out of this utility.
- 1
Paste your JSON
Drop any JSON document into the left input, or click "Load sample" to use the built-in bookshop example.
- 2
Enter a JSONPath expression
Type a path like $.store.books[*].title or click one of the preset examples to load it instantly.
- 3
See matching nodes
Each matched value appears in a numbered result list on the right — copy individual results or the full array.
- 4
Refine with filters
Use [?(@.key == value)] to filter arrays by field value. Try [?(@.inStock == true)] on the sample data.
JSONPath in practice
JSONPath was designed to let you pinpoint values inside a JSON document without writing parsing code. It's particularly useful when working with large API responses, configuration files, or testing assertions. Tools like Postman, AWS CloudFormation, Kubernetes selectors, and Elasticsearch all use JSONPath or a very similar dialect.
A concrete example: suppose an API returns a list of orders and you want to find the IDs of all unfulfilled orders over $50. The expression $.orders[?(@.status == "pending")].id does that in one step — no loops, no temporary variables.
The recursive descent operator
The .. operator is the most powerful part of JSONPath. Instead of navigating a known structure, it searches the entire document tree for matching keys. This is invaluable when you're handed an undocumented payload and just want to find all id or error fields regardless of where they're nested.
JSONPath vs JMESPath
JMESPath is an alternative query language used by AWS CLI and jq-like tools. It has a more consistent grammar and better-specified behaviour for edge cases. JSONPath is older and more widely adopted in non-AWS ecosystems. For most everyday queries — array traversal, field selection, basic filters — either language covers the same ground. If you need complex projections or multi-select lists, JMESPath has a cleaner syntax.
Frequently asked questions
What is JSONPath?+
JSONPath is a query language for JSON, similar to XPath for XML. It lets you navigate and extract values from a JSON document using a path expression like $.store.books[*].title. It was introduced by Stefan Goessner in 2007 and is widely used in testing frameworks, API tools, and data pipelines.
What JSONPath syntax does this tool support?+
This tool supports the most common expressions: $ (root), .key (child), ..key (recursive descent), [*] (all elements), [n] (index), [start:end] (slice), and [?(@.field op value)] for filter expressions. Nested filters and script expressions are not supported.
How do I filter an array by value?+
Use the filter syntax [?(@.key == value)]. For example, $.books[?(@.price < 20)] returns all books with a price below 20. Supported operators are ==, !=, <, <=, >, >=.
What is the difference between . and .. in JSONPath?+
A single dot (.) is a child operator — it selects the immediate named child. Double dot (..) is the recursive descent operator — it searches the entire nested structure for a matching key, no matter how deep. $..author finds all "author" keys at any level.
Is my JSON sent to a server?+
No. All processing happens in your browser using JavaScript. No data is uploaded or logged.
Keep exploring
More utilities and reading from Toolisk.