JSON Path Tester

Test JSONPath queries against your data with live results. Everything runs in your browser.

Your JSON is parsed and queried locally in this tab. Nothing is uploaded, and results update live as you type the path.

Supported syntax (compact subset)

$.a.b
child access by name
$['a']
bracket access by name (names with spaces or dots)
$[0]
array index (negative counts from the end)
$.a[*] and $[*]
wildcard over array elements or object values
$..name
recursive descent: every value stored under name, at any depth
$[0,2]
union of several selectors in one bracket (indexes or names)

Not supported: filter expressions such as [?(@.price<10)], array slices, and functions like length(). Those need a full JSONPath engine; this tester deliberately ships a small one that runs entirely in your browser.

About the JSON Path Tester

JSONPath is the query language for JSON that XPath is for XML: instead of describing a document by position, you describe it by shape. Before you wire a JSONPath expression into application code, a mapping step, or a monitoring rule, you want to know exactly which values it selects, and this tester answers that live, recalculating matches as you type both the document and the path.

The engine here is a deliberately compact subset: child access, bracket access, array indexes, wildcards, recursive descent, and selector unions. That covers the large majority of real-world queries, keeps behavior predictable across implementations, and lets everything run locally in your browser with zero dependencies. Filter expressions such as [?(@.price<10)] are honestly not supported rather than half-supported.

Matches are shown as collapsible, pretty-printed JSON blocks so large nested values stay readable. Once a query looks right, format the source document with the JSON Formatter, or convert selected data with the JSON to CSV Converter.

How to Test a JSONPath Query

  1. Paste your JSON into the data box, or click Sample data to load a small bookstore document.
  2. Check the validation line under the box: invalid JSON reports the exact line and column of the first error.
  3. Type a JSONPath expression such as $.store.book[0].title or $..price. Results update live as you type.
  4. Review the match count, then expand or collapse each match block to inspect the selected values.
  5. Iterate on the path until it selects exactly what you expect, then copy it into your code.

JSON Path Tester FAQs

Which JSONPath features are supported?

Child access ($.a.b), bracket access by name ($['a']), array indexes including negative ones ($[0] or $[-1]), wildcards over arrays and objects ($.a[*] and $[*]), recursive descent ($..name), and unions of several selectors in one bracket ($[0,2] or $['a','b']).

Why does my filter expression not work?

Filters are not supported. Expressions like [?(@.price<10)] need a full JSONPath engine with an expression evaluator, which this tool intentionally omits to stay small and dependency-free. You will get a clear path error instead of silently wrong results.

Is my JSON sent to a server?

No. Parsing, path evaluation, and rendering all happen in your browser tab. Nothing is uploaded, stored, or logged anywhere, which makes the tester safe for payloads that contain private or customer data.

What order do recursive descent matches come in?

Depth-first, in document order: the engine visits the root, then each property in the order it appears, descending into nested objects and arrays as it meets them. If the same key appears in several nested objects, matches arrive in the order a reader scanning top to bottom would encounter them.

Are $.a.b and $['a']['b'] the same thing?

Yes, they are two spellings of child access. Dot notation is shorter, while bracket notation accepts any key including names with spaces, dots, or hyphens. You can mix them freely, for example $.store['bicycle'].color.