Skip to content
Free tool · runs in your browser

JSONPath Evaluator

Run a JSONPath expression against your JSON and see the result

all authors
every price, at any depth
third book
last book
slice
filter by price
has a field
filter then project

Result — 4 matches

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

Paste JSON, write a JSONPath expression, and see exactly what it returns. Filters, wildcards, slices, unions and recursive descent are all supported, and the presets above cover the patterns you will use most. Runs entirely in your browser.

What JSONPath is

JSONPath is to JSON what XPath is to XML: a small query language for pulling values out of a nested structure without writing a loop for every level. It is what you reach for when an API returns three hundred lines and you want one field out of an array buried four levels down.

It was standardised as RFC 9535 in 2024. Before that every implementation differed slightly, which is why the same expression sometimes behaves differently in two libraries.

JSONPath syntax cheat sheet

ExpressionMeaning
$the root
$.storechild by name
$['store']the same, bracket form — needed for keys with spaces or dots
$.store.book[*]every element of the array
$..pricerecursive descent — every price at any depth
$..*every node in the document
$.book[0]first element
$.book[-1]last element
$.book[0:2]slice, start inclusive, end exclusive
$.book[-2:]last two
$.book[0,2]union — first and third
$.book[?(@.price < 10)]filter
$.book[?(@.isbn)]elements that have the field at all
$.book[?(@.category == 'fiction')]equality filter
$.book[?(@.price > 10 && @.category == 'fiction')]two conditions
$.book[?(@.price < 10)].titlefilter, then project a field

Inside a filter, @ refers to the element currently being tested. The comparison operators are ==, !=, <, <=, >, >=, joined with && and ||.

The parts implementations disagree about

Script expressions$..book[(@.length-1)] — let a library execute arbitrary code. RFC 9535 leaves them out and most maintained libraries have dropped them. They are not supported here, deliberately: evaluating user-supplied code in the browser is an obvious hole. Use [-1] instead.

Recursive descent is expensive. $..price walks every node in the document. On a large payload in a hot loop, prefer an explicit path.

Filters return elements, not booleans. $.book[?(@.price < 10)] gives you the books, not true. To get one field from them, project afterwards: $.book[?(@.price < 10)].title.

JSONPath or jq?

They overlap and are built for different places.

JSONPath is a path expression, usually embedded in another program — a config file, an API-testing assertion, an automation step that says "take this field from the response". It reads like a path and does not transform.

jq is a full stream-processing language with its own syntax. It filters, reshapes, computes and outputs, and it lives on the command line. If you need to change the shape of the data rather than just select from it, jq is the right tool.

Rule of thumb: selecting a value inside a larger workflow, JSONPath. Reshaping JSON at a shell prompt, jq.

Where this shows up in automation

Most automation work is JSON plumbing. An API returns a response, and the next step needs one field from it — the id of the record that was just created, the array of line items, the first error message. JSONPath is how that field gets named without writing code.

In Autonoly, the output of any API step is available to later steps this way, so a webhook payload or an API response can be picked apart and routed onward — into a spreadsheet, a database, or a message — without a script in between.

Use JSONPath in a real workflow

Let an AI agent do this automatically, on a schedule, across thousands of records.

Try Autonoly free

FAQ

Common Questions

Everything you need to know about JSONPath Evaluator.

Other free tools

Related automations, guides and terms

Where this shows up in real workflows.