BackendBench
Coffee
Free tool

JSONPath tester

Paste JSON, type a path such as $.store.book[?@.price < 10].title and see every match with its exact location.

Suggested queries for your JSON (they update as you edit it, click one to try it):

Matches
Normalized paths

Querying JSON with JSONPath

JSONPath does for JSON what XPath does for XML: it lets you point at the parts of a document you care about. You meet it in REST Assured and Spring MockMvc tests (jsonPath("$.items[0].id")), in Kubernetes kubectl -o jsonpath, in API gateways, in Postman scripts and in log processing tools. Writing the expression by trial and error against a real response is tedious, so this tester evaluates it live as you type.

Paste a JSON document, type a path and see every match along with its normalised path (such as $['store']['book'][2]['title']), which is the exact address of the value. The engine supports child and bracket notation, wildcards, negative indexes, slices ([1:3], [::-1]), unions, recursive descent, filter expressions with comparison and logic, and the RFC 9535 functions length, count, match, search and value.

Useful patterns

Everything runs in your browser, so you can safely paste production responses. If an expression works here but not in your library, check which JSONPath flavour it implements, because the pre-RFC versions disagree on filters, quoting and what an empty result looks like.

Frequently asked questions

What does $ mean in JSONPath?

The dollar sign is the root of the document. Every JSONPath expression starts with it: $.store.book means the book property of the store property of the root.

What is the difference between . and ..?

A single dot selects a direct child. Two dots (..) search the whole subtree, so $..price finds every price at any depth.

How do I filter an array?

Use [?(...)] with @ for the current item: $.store.book[?@.price < 10] returns the books cheaper than 10. Combine tests with && and ||.

Is JSONPath the same everywhere?

No. Implementations differed for years until RFC 9535 standardised it in 2024. This tester follows the RFC (including functions such as length() and match()); Jayway in Spring tests and some libraries accept slightly different syntax.

More tools you might need