Skip to main content

JSONPath Tester

Run JSONPath queries against pasted JSON with live results and syntax help.

100% client-side⌁ nothing leaves your browser⎘ instant results
Evaluated locally

Supported syntax (honest subset)

$Root object
.keyChild property
["key"]Child property (bracket form)
[0] [-1]Array index (negative = from end)
[*] .*All elements / all properties
..keyRecursive descent — key at any depth
..*Every node at any depth

Filter expressions ?(@.price > 10), slices [0:2] and unions [a,b] are not implemented — this is a deliberate, documented subset.

3 matches

Live results for $.store.book[*].author — values and their canonical paths below.

Matched values

[
  "Nigel Rees",
  "Evelyn Waugh",
  "Herman Melville"
]

Paths

  • $['store']['book'][0]['author']
  • $['store']['book'][1]['author']
  • $['store']['book'][2]['author']
100%
client-side compute
0
uploads — verify in devtools
96
free tools in the directory
0
network requests per keystroke

How it works

JSONPath is to JSON what XPath is to XML: a compact selector language for pulling values out of a nested document without writing traversal code. A query starts at the root $ and walks downward — $.store.book[0].titlereads as "root, then store, then the first book, then its title". This tester evaluates queries live as you type, against JSON you paste, showing both the matched values and the canonical path of every match so you can see exactly where in the document each result came from.

The evaluator implements an honest, documented subset of the language: child access in dot and bracket form, array indices with negative-from-the-end support, wildcards over both arrays and objects, and recursive descent. That core covers the overwhelming majority of real-world queries — the kubectl output flags, the Step Functions paths, the test assertions. Filters, slices and unions are deliberately omitted and clearly flagged as unsupported, because a tool that silently returns wrong results for advanced syntax is worse than one that draws its boundary plainly.

The match count in the result header is the fastest debugging signal. Zero matches with a valid query almost always means a misspelled key, a missing level of nesting, or using dot syntax against an array where an index or wildcard was needed. The paths list resolves these instantly: run a broader query like $..* or $.store.*, look at the actual paths the document contains, and tighten from there. It is the JSON equivalent of listing a directory before guessing at a filename.

Everything runs in your browser tab — the document you paste, which may be a production API response or a config containing internal hostnames, is parsed with JSON.parse and queried in plain JavaScript with zero network traffic. The prefilled example is the classic bookstore document from Gössner's original 2007 article, the de facto hello-world of JSONPath, so the prefilled query $.store.book[*].author returns three authors the moment the page loads and gives you a known-good baseline to mutate.

Frequently asked questions

Which JSONPath features does this tool support?

A deliberately documented subset: the $ root, dot and bracket child access (.key and ["key"]), array indices including negatives ([0], [-1]), wildcards over arrays and objects ([*] and .*), and recursive descent (..key, ..*). Filter expressions like ?(@.price > 10), slices like [0:2] and union selectors are not implemented — the tool tells you so explicitly rather than returning silently wrong results.

Why do different JSONPath implementations disagree on results?

JSONPath lived for nearly two decades as a 2007 blog post by Stefan Gössner rather than a specification, so every library filled the gaps differently — comparison semantics in filters, handling of negative indices, whether recursive descent visits the root, and the ordering of results all vary. RFC 9535 (2024) finally standardized the language, but most deployed libraries predate it. When behavior matters, test against the specific library your code uses.

What is the difference between JSONPath and jq?

JSONPath is a selector language: it picks nodes out of a document, like CSS selectors for JSON. jq is a full transformation language with pipes, functions, arithmetic and the ability to construct entirely new documents. If you need to extract a list of values — which API field, which config key — JSONPath is simpler and embeds cleanly in YAML configs and libraries. If you need to reshape, aggregate or compute, you want jq or code.

What does recursive descent (..) actually do?

The .. operator visits every node in the subtree — every object, array, and scalar at any depth — and then applies the following selector to each. So $..price finds every key named price no matter how deeply nested, and $..* enumerates every single node in the document. It is powerful but easy to over-match: on a large document $..id may return IDs from objects you did not intend, so prefer explicit paths when you know the structure.

Where is JSONPath used in real systems?

Everywhere structured data needs cheap extraction: Kubernetes kubectl's -o jsonpath output flag, AWS Step Functions input and output processing, Argo Workflows parameter passing, Postman test assertions, Grafana JSON datasource field mapping, and countless API testing tools. Each embeds a slightly different dialect, which is exactly why a quick local tester for the common-core syntax saves time before committing a query to a production config.

Built by FORG — AI cost observability for agentic coding. Free tools, no signup, nothing leaves your browser.

Learn about FORG