Skip to content
hateitall

JSONPath Tester

Work out the right JSONPath for an API response, a config lookup or a test assertion while you type.

Processed locallyIn: JSON, JSONPathOut: JSON, Paths

Loading tool…

How to use jsonpath tester

  1. Paste JSON or load the sample.

  2. Type a JSONPath starting with $, or click an example to start from.

  3. Read the matches as values, as normalised paths, or both.

  4. Copy or download the result.

What this tool does

  • Dot and bracket names, negative indexes, slices with steps, wildcards and recursive descent (..).
  • Filters with ==, !=, <, <=, >, >=, regex =~, &&, ||, !, parentheses and length().
  • Normalised paths such as $['store']['books'][2] for every match.
  • Errors name the column where the query stops making sense.

How the result is verified

Each match's normalised path is run again on its own and must land on exactly the same value.

Frequently asked questions

How do I get the last item of an array?

Use [-1] for the item itself or [-1:] for a one-item list. Both work without script expressions.

Why does my filter match nothing?

A filter runs on each child of the list, so @ is one item. Write $.books[?(@.price < 10)], not $[?(@.books.price < 10)], and quote strings: @.author == 'Ana'.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Collapsible, searchable tree view that stays fast on large files

JSON→ PathLight on device

Beautify or minify JSON with your choice of indentation

JSON→ JSONLight on device

Nested JSON to one level of dot path keys, and back

JSON→ JSONLight on device

TypeScript interfaces from a JSON sample, with optional keys

JSON→ TypeScriptLight on device