Path Tester
JSONPath tester online. Test JSONPath expressions against your data and see matched values instantly. Debug JSONPath queries free in your browser.
JSON Input
Loading editor...
Results (0 matches)
No results. Enter JSON and a JSONPath to query.
JSONPath Syntax:
| Expression | Description |
|---|---|
| $ | Root object |
| .key | Child property |
| [0] | Array index |
| .* | All children |
| $.a.b.c | Nested path |
Features
- Test JSONPath expressions in real-time
- See matched values instantly
- Syntax highlighting for queries
- Common pattern examples
- Export results as JSON or array
- Error messages for invalid paths
Common Use Cases
- Extract specific values from complex JSON
- Test API query selectors
- Build data extraction pipelines
- Filter large JSON datasets
- Learn JSONPath syntax
Understanding JSONPath
JSONPath is a query language for JSON, similar to XPath for XML. It lets you extract specific values from JSON using path expressions.
Common syntax:
$- Root element.property- Access object property[index]- Access array element[*]- All array elements..- Recursive descent (search all levels)[?(@.price < 10)]- Filter expression
Example: $.users[*].name gets all user names from an array.
Examples
JSON: {"user": {"name": "Alice"}}
Path: $.user.name
Result: "Alice"JSON: {"users": [{"name": "Alice"}, {"name": "Bob"}]}
Path: $.users[*].name
Result: ["Alice", "Bob"]JSON: {"name": "Alice"}
Path: $.invalid
Result: null (path not found)Frequently Asked Questions
$ is root, users is the array, [*] selects all elements, .name gets the name property from each.
Use filter expressions: $.items[?(@.price < 100)] finds items with price less than 100.
Yes! Use .. for recursive descent: $..name finds all "name" properties at any level.
You'll get an empty result or null, depending on the query. Check your JSON structure and path syntax.
Yes! Test your queries here, then use JSONPath libraries in your code to extract data from API responses.