chain
J
JSONPath Tester
PATH
JSON
MATCHES
// about this tool

JSONPath Tester Online

Updated 2026-08-02

Test JSONPath expressions against your own JSON online for free. Type an expression, see every match instantly, and — crucially — see the exact path each match came from, so you can tell which node answered rather than guessing from the value.

The full grammar people actually reach for is here: recursive descent ($..author), wildcards, negative indices, slices ($..book[1:3], $..book[::2]), unions ($..book[0,2]) and filter expressions ($..book[?(@.price < 10)]). Filters are parsed and compared directly rather than handed to eval, and everything runs in your browser, so the document stays on your machine. This is the same engine that powers the path queries in our JSON Viewer, so an expression you work out here behaves identically there.

// how to use

  1. 1 Paste your JSON into the left panel.
  2. 2 Type a JSONPath expression in the bar at the top — or click one of the presets to start from working syntax.
  3. 3 Read the matches on the right. Each one shows the exact path it came from, so you can see which node answered, not just what the value was.

// examples

Every author, wherever it appears
Input
$..author
Output
$.store.book[0].author   "Nigel Rees"
$.store.book[1].author   "Evelyn Waugh"
$.store.book[2].author   "Herman Melville"
Filter on a value
Input
$..book[?(@.price < 10)]
Output
$.store.book[0]   { category, author, title, price }
$.store.book[2]   { category, author, title, isbn, price }
Slice, union and negative index
Input
$..book[:2]     first two
$..book[0,2]    the first and the third
$..book[-1]     the last one
Output
$..book[:2]   -> $.store.book[0], $.store.book[1]
$..book[0,2]  -> $.store.book[0], $.store.book[2]
$..book[-1]   -> $.store.book[3]

// common uses

Working out the right expression before hard-coding it in an app or a CI check Pulling one field out of a large API response without writing a script Checking which nodes a filter actually matches when a query returns too much or too little Learning JSONPath syntax against your own data instead of a tutorial's

// faq

Which JSONPath syntax is supported?
Child access ($.a.b and $['a']), wildcards ($.*), recursive descent ($..key), array indices including negative ones ($[-1]), slices ($[1:3] and $[::2]), unions ($[0,2] and $['a','b']), and filters ($[?(@.price < 10)]).
What can I write inside a filter?
Compare a field against a literal with ==, !=, <, <=, > or >= — for example $..book[?(@.category == 'fiction')]. A bare field like $..book[?(@.isbn)] tests that the field exists and is truthy. Ordering comparisons only apply between two numbers, so @.title > 5 matches nothing instead of silently coercing.
Why does each match show a path?
When several nodes match, the value alone rarely tells you which one you meant — two books can share a price. The normalised path ($.store.book[2].price) identifies the node exactly, and you can copy the whole list of paths in one click.
Is this the same engine as the JSON Viewer's query bar?
Yes. The viewer's path queries and this tool run the same code, so an expression that works here works there. Previously the viewer carried a smaller copy that did not understand filters, slices or unions.
Is my JSON uploaded?
No. The expression is evaluated in your browser, so the document never leaves your machine. Nothing is executed either — filters are parsed and compared directly rather than passed to eval.

Use this via API

Get a free API key →
curl -X POST https://thesnaptools.com/api/v1/tools/jsonpath \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"json":"$..author"}'
Esc
↑↓ navigate open Esc close