RealJSON
Try now

JSONPath Online Query Tester

Paste JSON, type a JSONPath expression, and see every match and its path — live.

Try

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.

JSONPath Query Tester

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.

Supported JSONPath Syntax

Root, children and indexes

$ 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.

Wildcards and recursive descent

* selects every child. .. searches every depth, so $..author finds all authors wherever they are nested.

Slices

[start:end:step] works like Python slicing: [0:2] first two, [-2:] last two, [::2] every other item, [::-1] reversed.

Filters

[?(@.price < 10 && @.isbn)] keeps elements that satisfy a condition. Supported: == != < <= > >= =~ /regex/ in [..], && || !, existence tests like @.isbn and @.length for arrays and strings.

Frequently Asked Questions

What is JSONPath?

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.

How do I filter an array with JSONPath?

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.

What is the difference between . and .. in JSONPath?

A single dot selects a direct child. Two dots (..) is recursive descent: $..price finds every "price" key at any depth in the document.

Does this tool run my JSON or expressions on a server?

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.

Does it support JMESPath or jq?

No — this tool implements JSONPath. JMESPath and jq use different syntax. For simple reshaping, JSONPath filters, wildcards and slices cover most API-debugging tasks.

Related Tools

JSON Viewer · JSON Formatter · JSON Schema Validator · JSON Diff

Browse all free JSON tools →

Related tools