Start a project

Tool 52 of 100 · Data

JSONPath Tester

Write a JSONPath query and see every matching value and its exact path as you type, using the standard RFC 9535 rules.

JSONPath Tester at a glanceIllustration: 1, A JSON document; 2, processed in your browser; 3, Matched values.JSONPath Tester{ }1A JSON document3Matched values2In yourbrowser
1 A JSON document 2 processed on your device 3 Matched values

JSONPath Tester

JSON

Query

RFC 9535: $ root, @ current, .. any depth, [*], [0], [-1], [1:3], [?filter], length(), count(), match(), search()

Matches

#PathValue
Matched values (JSON)
Normalized paths

01

What it does

Runs RFC 9535 JSONPath queries on JSON and lists each match with its normalised path, with filters and functions.

  • Names, wildcards, indexes, slices and unions
  • Recursive descent with ..
  • Filters with comparisons and && || !
  • length(), count(), match(), search() and value()

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

Matches as JSON and their paths, with a Copy and a Download button on every result.

  • JSONPath
  • RFC 9535
  • JSON

Why it matters

JSONPath picks values out of JSON: the price of every book, the IDs of failed jobs, the third item of a list. It's used in API tests, Kubernetes kubectl, AWS Step Functions and many monitoring tools, but each tool used to implement it slightly differently.

RFC 9535 (2024) finally standardised it. This tester follows the standard exactly, with filter expressions and functions, and shows the normalised path of every match, so you can paste the query into your own code knowing what it will return.

How it works

  1. InputJSON and a JSONPath query
  2. In your browserRun with the RFC 9535 rules
  3. OutputMatches, their paths and the result as JSON

Where it fits in a designer's workflow

  1. Plan
  2. Design
  3. Build
  4. Test
  5. Launch
Writing queries for API tests, monitoring and data pipelines.

By the numbers

Matches for each example query on the sample storeEvery product name: 4 matches; Every price, at any depth: 4 matches; Out of stock: 1 match; In stock under £300: 2 matches; Has a finish: 1 match; Last product: 1 match; SKUs starting OAK-: 2 matches; More than one tag: 1 matchEvery product name4 matchesEvery price, at any depth4 matchesOut of stock1 matchIn stock under £3002 matchesHas a finish1 matchLast product1 matchSKUs starting OAK-2 matchesMore than one tag1 match
Run with this tool's own JSONPath engine, which follows RFC 9535, the 2024 standard: filters with ?, comparisons, && and ||, slices, and the match(), search() and length() functions. Source: RFC 9535: JSONPath.
Show the numbers as a table
QueryExpressionMatches
Every product name$.store.products[*].name4
Every price, at any depth$..price4
Out of stock$.store.products[?@.stock == 0].sku1
In stock under £300$.store.products[?@.price < 300 && @.stock > 0].name2
Has a finish$.store.products[?@.finish]1
Last product$.store.products[-1:]1
SKUs starting OAK-$.store.products[?match(@.sku, 'OAK-.*')].price2
More than one tag$.store.products[?length(@.tags) > 1].name1

How to use it

  1. Paste your JSON.
  2. Type a query starting with $, or choose an example.
  3. Read the matches and their paths.
  4. Copy the result as JSON.

FAQ

Is this the same as jq?

No. jq is a full language with its own syntax. JSONPath only selects values, and is what many APIs and test tools accept.

How do filters work?

?(@.price < 10) keeps array items whose price is under 10. Combine conditions with &&, || and !.

What's a normalised path?

A unique path to one value, like $['store']['book'][0]['title'], useful for pointing at exactly that value.

Why does my old query fail?

Some older libraries allowed script expressions or different quoting. RFC 9535 is stricter; the error explains what to change.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk