JSONPath Tester
Test JSONPath queries against any JSON document. Supports the classic Goessner syntax — $..book[*].author, filter expressions, slices, recursive descent. Live results, no upload, no signup.
Query in, matched values out
The classic Goessner store/book document, with a filter expression to pull the cheap titles.
$..book[?(@.price < 10)].title
[ "Sayings of the Century", "Moby Dick" ]
What you'll use this for
JSONPath is built for one job: pluck values out of structured data without writing a parser.
API responses
Spot-check that a vendor's REST response actually contains the field at the path you expect.
Postman / contract tests
Validate a JSONPath assertion before pasting it into Postman, Pact, or k6.
Kubernetes manifests
Prototype kubectl get -o jsonpath queries against a sample manifest dump.
Logs & events
Extract a nested field from a structured log line or Cloud Events envelope.
How to test a JSONPath query
Paste your JSON
Drop your document into the left editor. Invalid JSON shows a red error in the result pane.
Write the query
Start with $ for the root. . for child, .. for recursive descent, [*] for all, [?( )] for filters.
Pick result type
value returns matched values, path returns canonical paths, pointer returns RFC 6901 pointers, parent returns containing object.
Copy or iterate
Matches appear in the right editor. Tweak the query until it returns exactly what you want.
Frequently asked questions
JSONPath is a simple selector language inspired by XPath — designed to pluck values out of a JSON document. jq is a full Turing-complete pipeline language that also transforms and combines values. Use JSONPath for read-only selection; use jq when you need to reshape data. They overlap roughly 80% on simple queries.
The double dot is recursive descent. $..foo matches every property named foo at any depth in the document, not just at the top level. It is the most useful operator in JSONPath — but also the easiest way to write a query that returns more than you expected.
Filter syntax is [?(@.field op value)]. Common mistakes: forgetting the ?, forgetting the @. to refer to the current item, or using = instead of ==. String literals must be quoted: [?(@.color == 'red')]. Booleans are bare: [?(@.active == true)].
Yes. The original Goessner spec from 2007 was informal; RFC 9535 finally standardised it in 2024. Implementations still differ on filter expressions, function extensions, and edge cases like empty-array selectors. This tool uses jsonpath-plus, which is close to Goessner with some helpful extensions.
Up to a point. Everything runs in the browser, so memory is bounded by the tab. Files in the hundreds of megabytes will be sluggish; for multi-GB JSON, use jq or a streaming parser server-side. Auto-run also gets expensive on big docs — turn it off and use the manual Run query button.
About JSONPath
JSONPath is a query language for JSON, modeled after XPath. It was proposed by Stefan Goessner in 2007 and finally standardised as RFC 9535 in 2024. This tool uses the popular jsonpath-plus library, which closely follows Goessner with extensions for parent references, type filters, and script expressions.
Core operators
$— the root object.@— the current object (inside filter expressions)..or['name']— child operator...— recursive descent.*— wildcard for all children.[start:end:step]— array slice.[?(@.field op value)]— filter expression.
Result types explained
- value — the matched values themselves.
- path — Goessner-style normalised paths, e.g.
$['store']['book'][0]. - pointer — RFC 6901 JSON Pointers, e.g.
/store/book/0. - parent — the object that contains the match. Useful for mutation tooling.