JSONPath Evaluator & Tester

Paste JSON, type a JSONPath expression, and see the matching values and their exact paths update live. Supports $ root, .child, [*] wildcard, .. recursive descent, [n] index, [start:end:step] slices, unions and [?(@.price < 10)] filters. Everything runs in your browser — nothing is uploaded.

How to use the JSONPath tester

Paste (or keep the sample) JSON on the left, then type an expression in the JSONPath box. The result updates as you type: the Values tab shows the matched values as a JSON array, and the Paths tab shows the exact location of each match. Use the example chips to load common patterns, Format to pretty-print your JSON, and Copy to grab the current tab. If your JSON does not parse, or the path has a syntax error, the status line tells you exactly what is wrong.

JSONPath syntax

SyntaxMeaningExample
$The root of the document — every path starts here.$
.key or ['key']A child property by name. Use brackets for keys with dots, spaces or hyphens.$.store.bicycle.color
*Wildcard — every element of an array or every value of an object.$.store.book[*]
..Recursive descent — search that name at the current node and every descendant.$..author
[n]Array index (0-based). Negative counts from the end, so [-1] is the last.$.store.book[2]
[start:end:step]Array slice, Python-style. Any part is optional; a negative step reverses.$.store.book[0:2]
[a,b] / ['x','y']Union — several indexes or names in one step.$.store.book[0,2]
[?(expr)]Filter — keep only elements where the expression is true.$.store.book[?(@.price < 10)]

Filter expressions [?( … )]

A filter keeps only the elements for which its expression is true. Inside the filter, @ is the element being tested and $ is the whole document, so you can compare a field to a constant or to a value elsewhere in the JSON:

In a filterMeaningExample
@The current element being tested.@.price
$The document root (compare against a value elsewhere).@.price < $.expensive
== !=Equal / not equal (loose — 3 equals "3").@.category == 'fiction'
< <= > >=Numeric or string ordering comparison.@.price >= 8.99
=~Regular-expression match — right side is /pattern/flags.@.author =~ /^J/i
&& || !Combine conditions: and, or, not.@.price < 10 && @.category == 'fiction'
@.field (bare)Existence test — true when the property is present.@.isbn

For example, $.store.book[?(@.price < 10)].title returns the titles of every book under ten, and $.store.book[?(@.price < $.expensive)] returns every book cheaper than the document's own expensive threshold.

Worked example

With the bookstore sample loaded, $..author walks the whole document with recursive descent and returns all four authors. $.store.book[?(@.category == 'fiction')].title narrows to the three fiction titles, and $.store.book[-1:].title uses a slice to take the last book. Each result also carries its canonical bracket-notation path — for the first author that is $['store']['book'][0]['author'] — so you always know exactly where a value came from.

What this evaluator supports (and how it stays safe)

This tool implements the common Goessner-style JSONPath: root, child (dot and bracket), wildcard, recursive descent, array index (including negatives), Python-style slices, unions of indexes or names, and filter expressions with comparison, logical and regex operators. Unlike some libraries, it evaluates filters with a small hand-written interpreter and never uses eval() or the Function constructor — so it is safe to paste untrusted JSON or a complex filter, and it works under strict Content-Security-Policy. Script-style filters (arbitrary JavaScript) are not supported, which is a deliberate security choice.

Common uses

Privacy

The evaluator is pure client-side JavaScript — your JSON is parsed and queried in your browser, nothing is uploaded, nothing is logged, and there are no network requests. It keeps working offline once loaded.

Frequently asked questions

What is JSONPath?
JSONPath is a query language for JSON, similar in spirit to XPath for XML. You write a path expression like $.store.book[*].author and it returns every value in the document that the path selects. It is used to pull specific values out of large JSON responses, to write assertions in API tests, and inside tools like jq-alternatives, log processors and configuration systems. This evaluator implements the widely-used Goessner syntax — root ($), child (.name or ['name']), wildcard (*), recursive descent (..), array index and slice, unions and filter expressions.
How do I find a value no matter how deeply it is nested?
Use recursive descent — the .. operator. $..author returns every "author" property anywhere in the document, at any depth, so you do not need to know the exact path. You can combine it with other steps: $..book[0] takes the first element of every "book" array, and $..* returns every value in the whole structure. Recursive descent is the single most useful JSONPath feature for exploring an unfamiliar JSON payload.
What filter expressions are supported?
Filters go in [?( … )] and are evaluated against each element, where @ is the current element and $ is the document root. You can use the comparison operators == != < <= > >= (for example @.price < 10 or @.category == 'fiction'), combine them with && || and negate with !, test for a property's existence by naming it (@.isbn), match a regular expression with =~ (@.author =~ /^J/i), and reference values elsewhere in the document (@.price < $.expensive). Nested fields such as @.meta.views and array indexes such as @.tags[0] work inside filters too.
How is this different from a JSON formatter?
A JSON formatter pretty-prints or minifies a whole document — it changes how the JSON is displayed. A JSONPath evaluator instead extracts a subset of the data: you give it a query and it returns just the matching values (and the exact path to each). They are complementary — many people format their JSON first to read it, then write a JSONPath to pull out exactly the parts they need. This page links to our JSON Formatter for that first step.
Why are the result paths written like $['store']['book'][0]?
Each match is reported with its normalized (canonical) path in bracket notation. Bracket notation is unambiguous — it works for every key including ones with spaces, dots or hyphens that dot-notation cannot express — so it is the safe form to copy back into another tool or into code. The value at each of those paths is shown in the Values tab; the Paths tab lists where each match came from.
Is my JSON uploaded or stored?
No. The evaluator is plain JavaScript that parses and queries your JSON entirely in your browser — there are no network requests, nothing is logged, and the data never leaves your device. It even keeps working offline once the page has loaded. It also does not use eval() or the Function constructor: filter expressions are parsed by a small, safe interpreter, so pasting untrusted JSON or a complex filter cannot run arbitrary code.

Related tools

Explore more tools

Browse all 68 tools →