Productivity and Utilities

JSONPath Tester

Try a JSONPath query against your own JSON and see what it returns.

Paste JSON. It is read in this tab and nothing is uploaded. Up to 2,000,000 characters.

Start with $. Results update as you type.

Syntax you can use

QueryMeaning
$The whole document
$.store.bookA key, written with dots
$['store']['book']The same, in brackets, for keys with spaces or symbols
$.store.book[0]An item by position, starting at 0
$.store.book[-1]The last item
$.store.book[0,2]Several items
$.store.book[1:3]A slice: start up to, not including, end (also ::2 and ::-1)
$.store.*Every child of an object or array
$..priceEvery price anywhere below, at any depth
$..book[?(@.price < 10)]Items where a test is true
$..book[?(@.isbn && @.category == 'fiction')]Tests joined with && (and), || (or) or ! (not)
$..book[?match(@.author, 'Herman.*')]Text tests: match (whole value) and search (anywhere); also length() and count()

Queries are read by a parser written for this tool and are never run as code. Keys are matched exactly and only on the document itself. Numbers are read as ordinary JavaScript numbers, so integers beyond 15 digits can lose precision. Not every JSONPath feature is supported: script expressions, the old (?()) regular expression operator and functions other than length, count, match, search and value are not.

Next step

How to use the jsonpath tester

  1. Paste a JSON document into the first box. It is checked as you type.
  2. Write a JSONPath query starting with $, such as $.store.book[?(@.price < 10)].title.
  3. Read the number of matches and each match with its full path and value.
  4. Copy the values as a JSON list, or copy the paths.

Syntax you can use

$ is the whole document. A dot and a name pick a key, and brackets with a quoted name do the same for keys with spaces or symbols. A number in brackets picks an item by position, counting from 0, and a negative number counts from the end. A slice such as [1:3] takes items from the start up to but not including the end, and a third number sets the step, so [::2] takes every second item and [::-1] reverses.

An asterisk takes every child. Two dots, as in $..price, look at every level below. A filter, written [?(@.price < 10)], keeps the items for which a test is true. Tests may compare with ==, !=, <, <=, > and >=, join with && and ||, negate with !, and check that a key exists. The functions length, count, match, search and value are supported.

How it runs

The query is read by a parser written for this tool and evaluated against the parsed JSON. It is never given to eval or to a function constructor, so a query cannot run code. Only a document's own keys are matched, so names like constructor or __proto__ do not reach built in properties. A query that does too much work stops with a message instead of freezing the page.

Numbers are read as ordinary JavaScript numbers, so integers longer than 15 digits can lose precision in the values shown. Not every JSONPath feature exists in every library, so check the syntax your own code uses. You can validate the document with the JSON formatter and validator, browse it in the JSON viewer, or describe its shape with the JSON schema generator. For plain text patterns, the regex tester is the tool.

Reading the results

Each match is shown with its normalized path, such as $['store']['book'][0]['title'], which is an exact address for that value. A query that is valid but matches nothing shows a clear message, and a query with a mistake shows what was expected and where. Matching tests for text, such as match and search, use a regular expression of up to 200 characters.

Assumptions and limits

  • Queries use a subset of JSONPath: names, indexes, slices, wildcards, descent, filters and five functions.
  • Dot names may contain letters, digits, underscores and hyphens. Use brackets for other characters.
  • Comparisons between different types, such as a number and a string, are false.
  • Values are parsed as JavaScript numbers, so very large integers can lose precision.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do I test a JSONPath expression?

Paste your JSON, type the expression in the query box, and read the matches below. Each one is shown with its path.

What does $..price mean?

It finds every key named price at any depth below the root.

How do I filter items by a value?

Use a filter such as $.items[?(@.price < 10)]. The @ stands for each item being tested.

Why does my query return nothing?

The query may be valid but match nothing, for example because a key is spelled differently or a value is a string where you compared a number.

Does the tool run my query as code?

No. A parser reads it and the evaluator only walks the data, so a query cannot execute anything.