Skip to content
induwara.lk
Premium
induwara.lkDeveloper · Utility

JSONPath Tester & Evaluator (RFC 9535)

Paste a JSON document and a JSONPath expression to see every matched value and its exact normalized path — evaluated in your browser against the RFC 9535 standard. Wildcards, slices, filters, recursive descent and the built-in functions all supported. No signup, nothing uploaded.

By Induwara AshinsanaUpdated Jul 17, 2026
JSONPath TesterRFC 9535
Runs in your browser
Show

Enter a JSONPath query starting with the root identifier dollar sign.

Try

461 characters. Everything stays in your browser.

Matches
3
nodes in document order
Query status
Valid
Expression parsed per RFC 9535
Round-trip
Verified
Each path re-resolves to its value

Values

[
  "Nigel Rees",
  "Herman Melville",
  "J. R. R. Tolkien"
]

Document tree

— click any key to write its JSONPath above
Operator legend (RFC 9535)
  • $Root identifierThe whole JSON document; every query starts here.§2.2
  • .name / ['name']Name selectorSelect an object member by key.§2.3.1
  • * / [*]Wildcard selectorSelect all members of an object or all elements of an array.§2.3.2
  • [n]Index selectorSelect array element n; negative counts from the end.§2.3.3
  • [start:end:step]Array sliceHalf-open Python-style slice, negatives and step allowed.§2.3.4
  • [?<expr>]Filter selectorKeep items whose boolean expression is true.§2.3.5
  • ..Descendant segmentApply the next selector to a node and all of its descendants.§2.5.2
  • length() count() match() search() value()FunctionsBuilt-in filter functions defined by the standard.§2.4

Sources: RFC 9535 (JSONPath) and RFC 8259 (JSON). Filter regex uses the standard's I-Regexp semantics; results are cross-checked against the JSONPath Compliance Test Suite.

How it works

Evaluation is a pure, deterministic function of the pair (jsonDocument, expression) — no network, no randomness, no server. The engine follows RFC 9535, “JSONPath: Query Expressions for JSON”, the IETF standard published in February 2024. Four steps run on every keystroke:

  1. Parse the document. The JSON text is parsed per RFC 8259. If it is malformed, the tool shows the error message with its line and column and stops — a query never runs against invalid JSON.
  2. Parse the expression. The query is broken into segments per the RFC 9535 grammar: a leading root $ followed by child segments (.name, […]) and descendant segments (..name, ..[…]). Any syntax outside the standard raises an error with the exact character position.
  3. Apply the selectors left to right, threading a nodelist — a list of nodes, each carrying its value and its location from the root. Name selectors pick object members (§2.3.1), wildcards take everything (§2.3.2), index selectors read array elements with negative-from-end support (§2.3.3), slices apply a half-open Python-style start:end:step (§2.3.4), and filters keep items whose boolean expression is true (§2.3.5). A descendant segment first expands the nodelist to include each node and all of its descendants, depth-first, before applying its selector (§2.5.2).
  4. Emit results. The final nodelist gives the matched valuesin document order and, from each node's accumulated location, the normalized path in the canonical single-quote bracket form defined in §2.7 — for example $['store']['book'][0]['author'].

Filter expressions support comparisons == != < <= > >=, the logical operators && || !, parentheses, existence tests, and the five standard functions length(), count(), match(), search() and value() (§2.4). Comparisons are only defined between values of the same orderable type; anything else evaluates to false rather than throwing, exactly as the standard prescribes.

As a self-check, every result is round-tripped: the engine re-evaluates each match's normalized path and confirms it resolves back to the same single value. When that holds, the calculator shows “Round-trip verified”. The operator table and worked examples below were reconciled against RFC 9535 and the JSONPath Compliance Test Suite on 2026-07-17.

OperatorWhat it doesRFC 9535
$
Root identifier
The whole JSON document; every query starts here.§2.2
.name / ['name']
Name selector
Select an object member by key.§2.3.1
* / [*]
Wildcard selector
Select all members of an object or all elements of an array.§2.3.2
[n]
Index selector
Select array element n; negative counts from the end.§2.3.3
[start:end:step]
Array slice
Half-open Python-style slice, negatives and step allowed.§2.3.4
[?<expr>]
Filter selector
Keep items whose boolean expression is true.§2.3.5
..
Descendant segment
Apply the next selector to a node and all of its descendants.§2.5.2
length() count() match() search() value()
Functions
Built-in filter functions defined by the standard.§2.4

Worked examples

Each example runs against the RFC 9535 bookstore document (three books with author, title, category and price; a red bicycle). Load it with the Sample button in the tool above.

Recursive descent for a key — 3 matches

$..author

  1. ..author collects every 'author' member anywhere in the tree.
  2. The three book objects each have an author; the bicycle does not.
  3. Values: ["Nigel Rees", "Herman Melville", "J. R. R. Tolkien"]
  4. Paths: $['store']['book'][0..2]['author']

Filter on a numeric field — 2 matches

$.store.book[?(@.price < 15)].title

  1. Descend store → book, then keep elements where @.price < 15.
  2. Prices are 8.95, 12.99, 22.99 → the first two pass, the third fails.
  3. Take .title of each kept element.
  4. Values: ["Sayings of the Century", "Moby Dick"]

Negative array index — 1 match

$.store.book[-1].price

  1. [-1] resolves to length + (-1) = index 2, the last book (Tolkien).
  2. Then read its price member.
  3. Value: [22.99] · Path: $['store']['book'][2]['price']

Descendant + name — 4 matches

$.store..price

  1. store, then .. expands to store and every descendant.
  2. The name selector 'price' keeps each price member in document order.
  3. Three book prices, then the bicycle price.
  4. Values: [8.95, 12.99, 22.99, 19.95]

Frequently asked questions

Sources & references

The operator table and worked examples on this page were last cross-checked against RFC 9535 and the compliance test suite on 2026-07-17. The engine runs entirely client-side; if you find a query where it disagrees with the standard, email me the document and expression and I'll investigate.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.