DevTools Logo

JSONPath Evaluator

JSONPath Evaluator

Query JSON with filters, wildcards and recursive descent — locally.

Runs in your browser
Try an example

JSON document

Matches

No matches yet

Paste a JSON document and enter a path starting with $.

Examples

Cheap book titles

Input
$.store.book[?(@.price < 10)].title
Output
$.store.book[0].title = "Sayings"
$.store.book[2].title = "Moby Dick"

A numeric filter narrows the array before the trailing child selector reads the title.

Recursive author lookup

Input
$..author
Output
$.store.book[0].author = "Nigel Rees" …

Recursive descent finds matching properties at any depth without spelling out the nesting.

Existence check

Input
$.store.book[?(@.isbn)].title
Output
$.store.book[0].title = "Sayings"

A bare @.field in a filter keeps only objects where that field exists.

About this tool

The JSONPath Evaluator runs a path expression against a pasted JSON document and lists every match with its exact location and JSON type. It is a small, dependency-free reader of the JSONPath grammar: dot children, quoted bracket names, array indices and slices, wildcards, recursive descent and filter expressions.

Filters are the interesting part: @.price < 10, @.category == "fiction", @.isbn and combinations with &&, || and ! all work, with numeric and string comparisons applied only where they make sense. Each match is labeled with a canonical path such as $.store.book[0].title, so you can lift the result straight into a test assertion or an API fixture.

Error handling is deliberately quiet: a malformed path or document never throws at the page level. The output panel explains what went wrong and where in the path the parser stopped, while your input stays in place for editing. A zero-match query is a valid result, not an error.

Everything runs in this browser tab. Documents are often production-shaped payloads with customer data, so nothing is uploaded, logged or stored.

What this tool does not do

  • Implements a practical JSONPath subset: extension functions, union selectors, @.length() and script expressions are not available.
  • Filter comparisons use strict JSON value equality; objects are compared by their serialized form rather than field-by-field semantics.
  • Recursive descent is capped at 60 levels to keep very deep documents responsive.
  • Values matching NaN or Infinity cannot occur in JSON; number comparisons follow JavaScript number semantics within JSON's range.

How to use this tool

  1. Paste JSON

    Paste or type a JSON document, or load the book-store example with one click.

  2. Write a path

    Start with $ and add selectors: .key, [0], [*], ..key, [start:end:step] or [?(@.field op value)].

  3. Read the matches

    Each result shows its full path, JSON value and type; the summary counts matches, selectors and visited nodes.

  4. Copy the result

    Copy a path = value report or download it as text to paste into a bug report or test fixture.

Use cases

Debugging API responses

Check the exact expression a scraper or integration will run against a representative payload before shipping it.

Writing test assertions

Discover canonical paths for the values your tests need, then reuse them in assertion libraries that speak JSONPath.

Exploring unfamiliar JSON

Use recursive descent and wildcards to map the shape of a large document without scrolling through raw text.

Supported selectors

SyntaxMeaning
$.store.bookChild properties in order.
$['my-key']Bracket child selector for names with punctuation.
$[0] / $[-1]Array index from the start or the end.
$[1:4:2]Slice with optional start, end and step.
$..author / $..*Recursive descent over every descendant.
[?(@.price < 10)]Filter with comparisons, existence and && / || / !.

Every path must begin with $; extension functions and script expressions are not supported.

Common mistakes

Mistake:Forgetting the leading $

Fix:JSONPath expressions are rooted at $; store.book is reported as an invalid path instead of being guessed.

Mistake:Using XPath or JavaScript syntax in filters

Fix:Filters use @ for the current node and JSONPath operators (==, !=, <, >, <=, >=, &&, ||, !). There are no XPath functions or arbitrary JavaScript expressions.

Mistake:Expecting array selectors on objects

Fix:Indices and slices apply to arrays; use dot or quoted bracket notation for object keys. A selector that does not apply simply returns no matches.

Frequently asked questions

Which JSONPath features are supported?

Dot children, quoted bracket keys, array indices including negative ones, slices with a step, wildcards, recursive descent and filter expressions with ==, !=, <, >, <=, >=, existence checks, &&, ||, ! and parentheses. Paths must start with $.

Why did my expression return no matches?

Zero matches is a valid result. Check that every property name is spelled exactly, that array selectors are aimed at arrays, and that the path starts with $. Filters keep only elements where the expression is truthy, so a missing field means the element is skipped.

Can I use XPath-style functions in filters?

No. Filters use @ for the current node and JSON operators; there is no matches() or arbitrary JavaScript. You can combine comparisons and existence checks with &&, || and !, which covers the common selection cases without evaluating code.

How are values compared in filters?

Equality uses serialized JSON values, so numbers and strings must match their types. Ordering comparisons work for two numbers or two strings; mixed types simply do not match that comparison. A bare @.field keeps values that are present and truthy.

Does the tool support RFC 9535 completely?

It implements a useful subset rather than the full standard. Extension functions, union selectors and function expressions are outside the scope of this browser evaluator; the interface states the supported selector set explicitly.

Is my JSON document uploaded?

No. Parsing and evaluation happen in this browser tab. There is no network request, no account and no stored copy of the document.

References & standards