JSONPath Online Query Tester
Paste JSON, type a JSONPath expression, and see every match and its path — live.
JSON input
Result
Paste JSON, type a JSONPath expression, and see every match and its path — live.
JSON input
Result
In short: JSONPath is a query language for JSON, like XPath for XML. Type an expression such as $.store.book[?(@.price < 10)].title and RealJSON returns every matching value together with its path — instantly and entirely in your browser.
Large API responses are hard to read. A JSONPath expression lets you pull out exactly the values you care about — every user email, the last item of an array, all prices under a threshold — without writing code. This tester evaluates your expression live as you type and highlights syntax errors with the position of the problem.
Everything runs locally: your JSON is never uploaded, and expressions are parsed into a syntax tree rather than executed, so it is safe to paste untrusted queries.
$ is the root. Use .key or ['key'] for children, [0] for an index and [-1] for the last element. Unions like [0,2] and ['a','b'] select several at once.
* selects every child. .. searches every depth, so $..author finds all authors wherever they are nested.
[start:end:step] works like Python slicing: [0:2] first two, [-2:] last two, [::2] every other item, [::-1] reversed.
[?(@.price < 10 && @.isbn)] keeps elements that satisfy a condition. Supported: == != < <= > >= =~ /regex/ in [..], && || !, existence tests like @.isbn and @.length for arrays and strings.
JSONPath is a query language for JSON, similar to XPath for XML. An expression such as $.store.book[0].title walks the document from the root ($) and returns every value it selects.
Use a filter selector: $.store.book[?(@.price < 10)] returns every book cheaper than 10. Inside the parentheses, @ is the current element; combine tests with && and ||, negate with !, and compare with ==, !=, <, <=, >, >=, =~ (regex) or in.
A single dot selects a direct child. Two dots (..) is recursive descent: $..price finds every "price" key at any depth in the document.
No. Parsing and evaluation happen in your browser with a small built-in JSONPath engine. Expressions are parsed into a syntax tree and never passed to eval() or new Function(), so a pasted expression cannot execute code.
No — this tool implements JSONPath. JMESPath and jq use different syntax. For simple reshaping, JSONPath filters, wildcards and slices cover most API-debugging tasks.
JSON Viewer · JSON Formatter · JSON Schema Validator · JSON Diff
Browse all free JSON tools →
Related tools