JSON Path Tester

Paste a JSON document and run a JSONPath expression against it to see every matching value as you type. The tester supports the root $, dot and bracket property access, wildcards, recursive descent (..), indexes including negative ones, slices and unions. Your JSON stays in your browser.

How to use

  1. Paste your JSON into the JSON box (a bookstore sample is loaded to start with).
  2. Type a JSONPath expression starting with $, or click one of the Examples.
  3. Read the matches and the match count; an error message explains invalid JSON or an invalid expression.
  4. Untick Always wrap the result in an array to get a single match without brackets, then click Copy.

Example

Input

JSONPath: $..sku
{
  "orders": [
    { "id": 101, "items": [ { "sku": "A1", "qty": 2 }, { "sku": "B7", "qty": 1 } ] },
    { "id": 102, "items": [ { "sku": "C3", "qty": 5 } ] }
  ]
}

Output

[
  "A1",
  "B7",
  "C3"
]
3 match(es)

Frequently asked questions

Which JSONPath syntax is supported?

$ for the root, .name and ['name'] for properties, * and [*] wildcards, [n] and [-n] indexes, slices [start:end:step], unions such as [0,2] or ['a','b'] and recursive descent with ..name, ..* or ..[n].

Are filter expressions like [?(@.price < 10)] supported?

No. Filters and script expressions are not supported and are reported as invalid bracket content; use a JSONPath library in your code for those queries.

How do negative indexes and slices work?

Negative numbers count from the end, so [-1] is the last element. A slice [start:end] includes start but excludes end, so $.store.book[0:2] returns the first two books; an optional third number sets the step.

Is my JSON uploaded?

No. Parsing and evaluation run in your browser, so you can query responses that contain private data.

Related tools