About the JSONPath Tester
This tester runs a JSONPath query against a JSON document and shows every matching value with its normalized path, such as $['store']['book'][0]['title']. It follows RFC 9535, the JSONPath standard published in 2024, and passes the standard's compliance test suite. Queries are parsed and evaluated by hand-written code in your browser; nothing is sent to a server.
Supported: the root $, names (.name or ['name']), wildcards *, indexes including negative ones, slices [start:end:step], unions [0,2], descendants .., and filters ? with comparisons, &&, ||, !, parentheses, existence tests and the functions length(), count(), match(), search() and value().
How to use it
- Paste your JSON on the left, or keep the bookstore example from the RFC.
- Type a query. Errors point at the exact position that couldn't be parsed.
- Switch between nodes, values and paths, and copy the result as JSON.
Examples
- Cheap books: titles of the books under 10.
- Every price: a descendant query over the whole store.
- Your own data: names of admin users.
Common questions
How is RFC 9535 different from older JSONPath libraries?
Older implementations disagree on details. The standard fixes them: filters are written ?@.price < 10 (parentheses optional), there are no script expressions, string comparison uses code points, match() must match the whole string while search() finds a substring, and results come with normalized paths.
Why does a comparison with a missing member not fail?
A missing member is "Nothing". It's equal only to another Nothing, so @.isbn == null is false for books without an ISBN, while !@.isbn finds them.
Why is my query rejected?
Common causes: whitespace before $, a comparison with a non-singular query such as @.*, or length(@.*). Only queries made of names and indexes can be compared.
Related tools
- JSON Formatter & Validator: fix JSON that won't parse.
- JSON to TypeScript & Go Types: generate types from the same document.
- Regex Tester: try a pattern for
match()orsearch().