JSONPath Tester
Test and validate JSONPath expressions against JSON documents with real-time results
Enter or paste JSON data to query
Enter a JSONPath expression (e.g., $.field, $[*], $..name)
What is JSONPath?
JSONPath is a query language for JSON, similar to XPath for XML. It allows you to extract specific values from JSON documents using path expressions. This tool helps you test JSONPath expressions against your JSON data entirely in your browser.
How to Use
- Paste your JSON data into the first field
- Enter a JSONPath expression in the second field
- Click "Evaluate" to see matching nodes and their paths
- Copy the results using the "Copy Results" button
Common JSONPath Expressions
$- Root element$.field- Access a field$.parent.child- Nested field access$[0]- First array element$[*]- All array elements$.*- All object properties$..name- Recursive descent (all "name" fields)$[0:3]- Array slice (elements 0-2)$[?(@.price < 10)]- Filter expression
Example
JSON Data:
{
"store": {
"book": [
{"title": "Book 1", "price": 10},
{"title": "Book 2", "price": 20}
]
}
} Expression: $.store.book[*].title
Results: ["Book 1", "Book 2"]
Features
- Test JSONPath expressions in real-time
- View matched nodes with their paths
- Support for filters, wildcards, and recursive descent
- Expression syntax validation
- 100% client-side processing for privacy
Frequently Asked Questions
What is JSONPath?
JSONPath is a query language for JSON that allows you to extract specific data from JSON documents using path expressions. It's similar to XPath for XML and is useful for parsing API responses and configuration files.
What's the difference between $ and $..?
$ refers to the root element, while $.. is the recursive
descent operator that searches for matching fields at any depth in the JSON structure.
How do I filter array elements?
Use filter expressions like $[?(@.price < 10)] to select array elements
that match a condition. The @ symbol represents the current element being tested.
Is my data sent to a server?
No, all JSONPath evaluation happens in your browser. Your data never leaves your device, ensuring complete privacy and security.
Can I use wildcards?
Yes! Use * to match all elements. For example, $.* selects
all properties of an object, and $[*] selects all elements of an array.