Developers

JSONPath Tester

Paste JSON, type a JSONPath expression, and see the matching values and their exact paths update as you type. Filters, slices, wildcards and recursive descent are all supported.

AdvertisementAd slot: leaderboard-top

Examples:

Embed this tool

Put this free JSONPath Tester on your own website — copy the code below and paste it into your page's HTML.

AdvertisementAd slot: in-content

How to test a JSONPath expression

  1. Paste your JSON into the left box (a sample bookstore document is loaded to start).
  2. Type a JSONPath expression starting with $. Results update as you type, with any errors explained above.
  3. Read the matching values on the right and the exact path of each match below them, ready to copy into your code.

JSONPath syntax

ExpressionMeaning
$The root of the document
.name or ['name']A child property (use brackets for names with spaces or dashes)
[0], [-1]Array item by position; negative counts from the end
[*] or .*Every item or property
..nameRecursive descent: name at any depth
[0,2], ['a','b']Union of several items
[1:3], [::2]Array slice: start, end (exclusive) and step
[?(@.price < 10)]Filter: items where the condition is true

Filter expressions

Inside a filter, @ is the current item and $ is the document root. You can compare with == != < <= > >=, match text with a regular expression using =~ /pattern/i, combine conditions with &&, || and !, and group them with brackets. A path on its own, such as [?(@.isbn)], keeps items where that property exists. @.tags.length gives the length of an array or string.

JSONPath was introduced by Stefan Goessner and standardized as RFC 9535 in 2024. Implementations differ in small ways, especially in filter syntax; this tester follows the widely used Goessner style, which most libraries (Jayway, jsonpath-plus, AWS and Kubernetes tools) accept.

Need a different tool? Suggest it here — we read every message.

Frequently asked questions

Why does my expression return nothing?

Check capital letters (property names are case-sensitive), whether the value is inside an array (you may need [*]), and that strings in filters are quoted, for example [?(@.category == 'fiction')].

Does it run code from my filter?

No. Filters are parsed by a small safe evaluator that only understands comparisons, regular expressions and logic, so nothing in the expression is executed as JavaScript.

How big can my JSON be?

Several megabytes is fine on a computer. Results are shown in full; the paths list shows the first 500 matches.

What is the difference between JSONPath and jq?

jq is a command-line language that can also transform data. JSONPath only selects parts of a document, and is what many APIs, test tools and config systems use.

Is anything sent to a server?

No. Everything is calculated in your browser, and nothing you enter leaves your device.

Related tools & templates

AdvertisementAd slot: footer-leaderboard