JSONPath Evaluator
Paste JSON and enter a JSONPath expression to extract values. Supports $, *, .., and filter expressions. 100% client-side.
How to Use the JSONPath Evaluator
- Paste your JSON into the input area on the left.
- Enter a JSONPath expression in the expression field above the panes.
- Click Evaluate or modify the JSON — results update as you type.
- Switch modes — "Highlight Matches" shows the full JSON with matches marked, "Raw Values" shows only the matched values as a JSON array.
- Download results as a JSON file for further processing.
JSONPath Syntax Reference
| Expression | Description | Example |
|---|---|---|
$ |
Root element | $ |
.key |
Child property | $.name |
['key'] |
Bracket notation (for keys with spaces) | $['first name'] |
[n] |
Array index (0-based) | $.tools[0] |
[*] or .* |
All children | $.tools[*] |
..key |
Recursive descent | $..name |
[?(@.key)] |
Filter: has property | $.tools[?(@.active)] |
[?(@.key == val)] |
Filter: equality | $.tools[?(@.type == 'json')] |
Practical Use Cases for JSONPath
JSONPath is used across many developer workflows. In REST API testing frameworks like REST Assured (Java) and RestSharp (.NET), JSONPath assertions verify that API responses contain the expected data. In AWS CloudFormation and Azure Resource Manager templates, JSONPath-like expressions extract values from resource outputs. Kubernetes admission webhooks use JSONPath to patch resources. In Node.js applications, libraries like jsonpath and jsonpath-plus implement the standard. Testing tools like Postman and Insomnia support JSONPath assertions natively in test scripts.
Recursive Descent with ..
One of the most powerful JSONPath operators is the recursive descent operator ... It searches the entire JSON tree for the specified key at any depth. For example, given a deeply nested response, $..id will find every id field regardless of nesting level. This is particularly useful for traversing inconsistent or deeply nested API responses where the exact structure is not known in advance. The recursive descent is computationally more expensive than direct path access, so use specific paths when possible for performance.
Filter Expressions
Filter expressions allow you to select array elements that match a condition. The syntax [?(@.property)] selects elements that have the named property (truthy existence check). The syntax [?(@.property == 'value')] selects elements where the property equals a specific value. Filters can use comparison operators: ==, !=, <, >, <=, >=. These are powerful for extracting specific records from arrays of objects without knowing their index positions.