datapry

JSONPath Explorer

Query JSON with JSONPath expressions and see every match with its exact path. Runs in your browser, so nothing is uploaded.

Show

JSON input

Matches

Waiting for input

About this tool

JSONPath picks values out of JSON with a short expression, such as $.store.books[*].title. Type a query and see the matches as you go, along with each match's normalized path. The parser follows RFC 9535 and never evaluates code, so filters can't run scripts.

How to use it

  1. Paste JSON or import a file.
  2. Type a query starting with $.
  3. Choose whether to see values, paths or both.

Example

Input
{"books":[{"title":"Clean Code","price":8.99},{"title":"Refactoring","price":32}]}
Output
[
  "Clean Code"
]

Query: $.books[?@.price < 10].title

Questions

Which syntax is supported?
Member names (.name and ['name']), wildcards (*), indexes including negative ones, slices ([1:3], [::-1]), recursive descent (..), and filters with comparisons, &&, || and !. Function extensions such as length() aren't supported yet.
What do filters look like?
Use ?@ for the current item, as in $.books[?@.price < 10]. You can combine tests, as in [?@.inStock && @.price < 10], or check that a field exists with [?@.isbn].
Is this safe with untrusted expressions?
Yes. Some JSONPath libraries evaluate filters as JavaScript, which has led to security flaws. Here, expressions are parsed and interpreted, so they can only read data.