HCODX/JSONPath Tester
100% browser-based · jsonpath-plus · recursive descent

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.

JSON
Result
Query & options
JSON Formatter
Matches
0
Query depth
0
Input nodes
0
Status
Ready
Example

Query in, matched values out

The classic Goessner store/book document, with a filter expression to pull the cheap titles.

Query
$..book[?(@.price < 10)].title
Result
[
  "Sayings of the Century",
  "Moby Dick"
]
Use cases

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.

Step by step

How to test a JSONPath query

1

Paste your JSON

Drop your document into the left editor. Invalid JSON shows a red error in the result pane.

2

Write the query

Start with $ for the root. . for child, .. for recursive descent, [*] for all, [?( )] for filters.

3

Pick result type

value returns matched values, path returns canonical paths, pointer returns RFC 6901 pointers, parent returns containing object.

4

Copy or iterate

Matches appear in the right editor. Tweak the query until it returns exactly what you want.

FAQ

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

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

Related tools