JSONPath Query

Query JSON with JSONPath and see every match with its JSON Pointer path.

  • Runs locally in your browser
  • No upload required

Try it

Paste JSON. It is queried in your browser and never uploaded.

Supported: $, .name, ['name'], ..name, ..*, .*, [*], [n] and unions.

Matches
2
Result
/store/book/0/title "A" /store/book/1/title "B"
/store/book/0/title  "A"
/store/book/1/title  "B"

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

The expression matched 2 value(s).

How it works

  • Parsed the JSON document with the verbatim scanner.
  • Compiled the JSONPath expression to child, wildcard and recursive steps.
  • Walked the tree and normalized each match to an RFC 6901 pointer.
  • Filters, slices and functions are outside the supported subset and are reported as errors.

Methodology

  1. Parse the document with the F054 verbatim scanner.
  2. Compile the expression to a sequence of child, wildcard and recursive-descent steps.
  3. Evaluate depth-first in document order and normalize each match to an RFC 6901 pointer.

Usage

  1. Paste a JSON document.
  2. Enter a JSONPath expression such as $.store.book[*].title or $..price.
  3. Run the tool and read each match with its pointer path.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Member and wildcard

jsonSelect to copy
{
  "text": "{\"store\":{\"book\":[{\"title\":\"A\"},{\"title\":\"B\"}]}}",
  "path": "$.store.book[*].title"
}

Recursive descent

jsonSelect to copy
{
  "text": "{\"a\":{\"price\":1},\"b\":{\"price\":2}}",
  "path": "$..price"
}

Array index

jsonSelect to copy
{
  "text": "{\"items\":[10,20,30]}",
  "path": "$.items[1]"
}

Limitations

Pointers from matches

Every match is labelled with its RFC 6901 JSON Pointer path so it can be pasted into the JSON Pointer tool or a JSON Patch document.

Frequently asked questions

Which JSONPath features are supported?
Root $, child .name and ['name'], recursive ..name, wildcards .* and [*], array index [n], and unions such as ['a','b'].
Why did my filter fail?
Filter expressions are outside the supported subset; the tool reports the position of the unsupported syntax instead of guessing.
Is my data uploaded?
No. The query runs entirely in your browser and is never sent anywhere.

Sources

  1. RFC 9535 — JSONPath: Query Expressions for JSON — IETF
  2. MDN Web Docs — JSON — MDN