JSONPath online tester

Test JSONPath queries against your JSON and see the matches as you type. Free, no sign-up, and everything runs in your browser.

Starts with $. Results update as you type.

Result

3 matches
[
  "The Mom Test",
  "Shape Up",
  "Deep Work"
]

Path finder

Every path in your JSON. Search for a key or value, then select a row to use its path as the query.

What this JSONPath tester does

JSONPath is a short query language for picking values out of a JSON document, a little like a file path for data. It started as a 2007 proposal by Stefan Gössner1 and became an IETF standard, RFC 9535, in February 2024.2

Paste your JSON, type a query that starts with $, and the matches show at once. Switch the result to Paths to see where each match lives, written as a normalized path such as $['store']['book'][0], which is the exact form the standard defines.2 The Path finder lists every path in your document, so you can search for a key or value and select it instead of writing the query by hand. Nothing you paste leaves your browser.

How to write a JSONPath query

Every query starts at the root, $, and then steps down into the data:

QueryWhat it selects
$.store.nameThe name member of store
$['store']['name']The same, in bracket notation (use it for keys with spaces or dashes)
$.store.book[0]The first book
$.store.book[-1]The last book
$.store.book[0:2]The first two books (a slice: start, end, optional step)
$.store.book[*].titleEvery book's title
$..priceEvery price at any depth
$.store.book[[email protected] < 20]Books whose price is under 20

Inside a filter, @ is the item being tested. You can combine tests with &&, || and !, compare with ==, !=, <, <=, > and >=, and use the five functions the standard defines:2 length(), count(), match(), search() and value(). For example, $.store.book[?match(@.author, 'R.*')] keeps books whose author starts with R, and $.store.book[?length(@.tags) > 0] keeps books that have at least one tag.

Tips when a query returns nothing

  • Check the casing. $.Store and $.store are different keys.
  • Use brackets for unusual keys: $['first-name'], not $.first-name.
  • A filter tests the items inside an array, so write $.book[[email protected] < 20], not $.book[[email protected] < 20].
  • A missing key is not the same as null. [[email protected]] keeps items that have the key, even when its value is null.

Frequently asked questions