← Tools

JSONPath Tester

Paste JSON, write a JSONPath expression and see what it selects.

Private: your files never leave your device.

Result

JSONPath cheat sheet
WriteTo get
$The whole document (the root)
.name ['name']A field by name (use quotes for names with spaces or symbols)
[0] [-1]An item of a list by position, from the start or from the end
[0:3] [::2] [::-1]A slice: start:end:step (end not included)
* [*]Every field or item
..name ..*Search at every depth
[0,2] ['a','b']Several at once
[?@.price < 10]A filter: items where the test is true (@ is the current item)
== != < <= > >=Compare numbers, text, true, false and null
&& || ! ( )And, or, not, grouping
[?@.isbn]Items that have the field
length(@.tags)Length of text, a list or an object
count(@.*)How many nodes a query finds
match(@.id, 'A-[0-9]+')The whole text matches a regular expression
search(@.name, 'smith')The text contains a match somewhere
value(@..price)The single value a query finds

This tool follows the JSONPath standard (RFC 9535) and passes its official test suite. Script expressions like (@.length-1) and =~ from older tools aren't part of the standard: the error message shows the standard way.

Results update as you type. Large numbers keep every digit. Everything happens on your device; nothing you paste is uploaded.

How it works

  1. Choose your files.
  2. Adjust the settings if you like.
  3. Download the result, or send it to another device with BroAllDone.

Frequently asked questions

What is JSONPath?

A short way to pick values out of JSON, like $.store.book[0].title. $ is the whole document, a dot or [ ] goes into a field or a list, and .. searches at every depth. Many APIs, databases and tools such as kubectl and Postman use it.

How do I filter items in JSONPath?

Use ? with a test, where @ is the current item: $..book[?@.price < 10] gives the books cheaper than 10. Combine tests with && and ||, and use ! for not.

Which JSONPath syntax does this tool use?

The official standard, RFC 9535, and it passes the standard's compliance test suite. That includes filters, slices, the functions length(), count(), match(), search() and value(), and normalized paths.

Why doesn't my expression from another tool work?

Older tools had extras like (@.length-1), =~ or in that aren't in the standard. The error message shows the standard way, for example [-1] for the last item or match() for a regular expression.

How do I get the path of each match?

Under Show, choose Paths, or Paths and values. Paths can be normalized ($['store']['book'][0]) or in dot style ($.store.book[0]).

Is my JSON uploaded?

No. Everything runs in your browser, so you can safely test API responses, configuration files and private data. Large numbers keep every digit.

More free tools