JSONPath Tester
Run JSONPath queries against any JSON document. See matched nodes and their paths in real time.
Enter input above to see the result.
What is this for?
JSONPath is to JSON what XPath is to XML — a query language for extracting specific values from nested documents without writing custom parsing code. A query like $.store.books[*].title retrieves every book title under store; $..price finds every price anywhere in the structure, regardless of depth. This tool executes JSONPath queries live against any JSON document you provide, displaying both the matched values and their full paths, so you can refine your query iteratively until it returns exactly what you need.
When to use it
- Drafting a JSONPath query for a tool or platform that supports it: Postman test assertions, n8n workflows, AWS Step Functions, Stedi, or jq-like CLI utilities.
- Extracting specific fields from large API responses without writing a custom script or parsing logic.
- Filtering arrays by conditional criteria — for example, retrieving all orders where the total exceeds 100, or all users in a specific region.
- Validating that a deeply nested path resolves to an actual value before embedding it in production code or automation rules.
- Exploring an unfamiliar JSON structure to understand its shape and locate fields you need to work with.
- Testing filter expressions and complex selectors to ensure they behave as intended across different JSONPath implementations.
How it works
- Paste your JSON into the left panel. The tool validates it automatically and flags syntax errors.
- Enter a JSONPath query in the query field. Start simple —
$returns the root,$.fieldnamereturns a single property — then add filters, wildcards, or recursive descent as needed. - See results in real time. The right panel shows all matched nodes with their full paths, making it clear whether your query is working as expected.
- Iterate quickly. Modify your query and watch the results update instantly. No page reload, no copy-paste cycle.
- Copy the query. Once you have a query that works, copy it directly into your Postman test, workflow builder, or application code.
JSONPath syntax cheat sheet
$— root of the document..propertyor['property']— access a child by name...— recursive descent; matches at any depth.*— wildcard; matches any property name or array element.[0],[-1]— array index; negative indices count from the end.[2:5],[::2]— array slice using Python-style syntax.[0,2,4]— union; selects multiple indices or property names.[?(@.status == 'active')]— filter expression;@refers to the current item. Supports== != < > <= >= && || =~ /regex/.
Common gotchas
- No single official standard. The original Stefan Gössner draft has been the de-facto reference; RFC 9535 (February 2024) formalised it. Different tools (Postman, Jaeger, jq) implement slightly different dialects. Test your query in the actual tool where you'll use it if precision matters.
- Dot notation has limits.
$.foo-barparses as "foo minus bar". For property names containing hyphens, dots, spaces, or special characters, use bracket notation:$['foo-bar']. - Filter expressions here are JavaScript-flavoured. This tool's filter syntax is more permissive than RFC 9535 for convenience, but won't necessarily match other implementations. Avoid relying on filters to work identically elsewhere without testing.
$..*returns the entire tree. Recursive descent with wildcard is powerful for exploration but can produce thousands of results on large documents. Use more specific paths for production queries.- Numeric object keys. In JSON like
{"1": "value"}, use$['1']to access numeric property names; dot notation$.1won't work.