How to use the JSONPath Tester
- Paste your JSON (or keep the sample bookstore).
- Type a JSONPath expression, or click an example.
- Read the matched values and the exact path of each one, then copy the result.
JSONPath syntax
| Expression | Meaning |
|---|---|
$ | The root of the document |
.key or ['key'] | A child property (use brackets for keys with spaces or dots) |
[0], [-1] | Array element by index; negative counts from the end |
[0:3], [-2:] | Array slice |
* | Wildcard: all children |
.. | Recursive descent: search at any depth ($..price) |
[?(@.price < 10)] | Filter: elements where the expression is true; @ is the current element |
[0,2], ['a','b'] | Union of several indexes or keys |
Filters
Filters support comparisons (==, !=, <, >=…), logical operators (&&, ||) and existence checks ([?(@.isbn)]). This tester evaluates filters in a safe sandboxed mode, so expressions cannot run arbitrary code.
Implementations differ
JSONPath was informal for years until RFC 9535 (2024) standardised it. Libraries still differ in edge cases — filter syntax, regular expressions and how missing keys behave. This tool uses JSONPath Plus, a widely used JavaScript implementation; check your target library (Jayway in Java, jsonpath-ng in Python, AWS Step Functions, Postman) for its exact dialect.
JSONPath vs jq
jq is a full transformation language for the command line; JSONPath only selects values. $.store.book[*].title in JSONPath corresponds to .store.book[].title in jq. To browse a document and copy paths by clicking, use the JSON viewer; for Make, Zapier and n8n mapping syntax, the JSON path finder.
Tools that pair well with the JSONPath Tester
- JSON Schema Validator — Paste a schema and some JSON to see exactly which values break which rule — or generate a starting schema from example data.
- JSON Diff — Find exactly what changed between two JSON documents — API responses, config versions, fixtures or exports — as a list of paths with old and new values.
- OpenAPI / Swagger Validator — Paste an API specification to check it against the official OpenAPI schema, catch broken references and inconsistent path parameters, and see every endpoint at a glance.
- JSON to YAML — Paste JSON and get clean YAML for Kubernetes manifests, Docker Compose, GitHub Actions or any config file.
Frequently asked questions
What does $.. mean in JSONPath?
$..price finds every price property at any depth.How do I filter an array in JSONPath?
$.items[?(@.price > 10)] selects items whose price is above 10.