waynetools/jsonpath-tester
Updated 2026-07-11 · Built by Wayne

JSONPath Tester — Evaluate Expressions with Explained Matches

Paste JSON, write a JSONPath expression, and see every match update live: its absolute path, its value, a highlighted spot in the tree below, and a plain-English breakdown of what each part of your expression is doing. Runs entirely in your browser.

JSONPath tester in one line: type an expression like $..price or $.store.book[?(@.price < 10)].title against your JSON on the left, and the panel on the right lists every match with its exact path, highlights it inside the tree, and explains the expression segment by segment — no upload, no signup, instant.

100% client-side Free No signup Absolute paths for every match Plain-English explanation Filters, slices, wildcards

JSON input

JSON tree matches highlighted

JSONPath expression

Matches

What this expression does

What is JSONPath?

JSONPath is a small query language for pulling values out of a JSON document by pattern instead of by hand-written traversal code. An expression always starts at the root, written $, and then walks down through object keys and array indices using a compact syntax: dots for named children ($.store.name), brackets for indices or quoted names ($.store.book[0]), * for wildcards, .. for recursive descent into every nested level, and [?(...)] for filter conditions. It is the JSON equivalent of XPath for XML, and it shows up constantly in API test assertions (Postman, RestAssured, k6, Newman), log and webhook field extraction rules, JSONPath-based database queries (PostgreSQL jsonb_path_query, MongoDB-adjacent tooling), and configuration files that need to reach into a nested payload without writing a parser.

How to use this JSONPath tester

  1. Paste your JSON into the left panel, or keep the sample data that loads by default.
  2. Type a JSONPath expression into the box on the right — results update as you type, with no button to press.
  3. Read the match count and scroll the results list: each row shows the absolute path of that match and its value.
  4. Look at the tree panel underneath the JSON input — every matched node is outlined in amber so you can see where your matches sit inside the overall document shape.
  5. Check the "What this expression does" panel: it splits your expression into segments and explains each one in plain English, which is the fastest way to spot a typo or a wrong assumption about how a segment behaves.
  6. Click any example chip to insert a working expression pattern, then edit the field names to match your own data.

Two worked examples

Example 1 — recursive descent for every price

Given a document with nested book objects that each have a price field, this expression collects every price at any depth:

Input JSON (excerpt):
{ "store": { "book": [
  { "title": "Sapiens", "price": 12.99 },
  { "title": "Clean Code", "price": 24.5 }
] } }

Expression:  $..price

Output (2 matches):
$.store.book[0].price  →  12.99
$.store.book[1].price  →  24.5

Example 2 — filter by condition, return one field

This expression walks the same book array, keeps only the items whose price is under 20, and returns their titles:

Expression:  $.store.book[?(@.price < 20)].title

Output (1 match):
$.store.book[0].title  →  "Sapiens"

Syntax reference

SyntaxMeaning
$The root of the document.
.nameChild property named "name".
['name']Child property, bracket form — needed when the name has spaces or special characters.
*Wildcard — every property of an object, or every element of an array.
..nameRecursive descent — every "name" property found at any depth below this point.
[0]Array index (also accepts negative, e.g. [-1] for the last element).
[0,2,4]Index union — several specific array positions at once.
[1:4]Slice — elements from index 1 up to (not including) 4. [:3], [2:] and [::2] (step) also work.
[?(@.price < 10)]Filter — keep only elements where the condition on the current element (@) is true.

Frequently asked questions

What is JSONPath and what is it used for?

JSONPath is a query language for JSON, similar in spirit to XPath for XML. It lets you address one or more values inside a JSON document with a compact expression like $.store.book[0].title or $..price, instead of writing manual loops. It is used to extract fields from API responses, write assertions in API tests, configure log or webhook field extraction, and query JSON columns in databases and log pipelines.

Does this tool send my JSON anywhere?

No. Parsing your JSON, parsing the JSONPath expression, and evaluating matches all run in plain JavaScript in your browser tab. There is no server call after the page loads, no analytics on your pasted data, and no upload. You can disconnect from the network and it keeps working.

Why does the tool show an absolute path for every match instead of just the value?

An expression like $..price or a filter can match several different locations in a document, and two matches can share the identical value. The absolute path — written like $.store.book[2].price — tells you exactly which node matched, which is what you need when writing a follow-up extraction, a test assertion, or debugging why a match count is wrong.

What JSONPath syntax does this tester support?

Root $, dot child, bracket child, wildcard, recursive descent, array index (including negative), index unions, name unions, array slices, and filter expressions with ==, !=, >, >=, <, <=, and simple && / || combinations. This covers the syntax used in the vast majority of real-world JSONPath expressions found in API tests and config files.

How is this different from just writing a JavaScript loop?

A loop only tells you whether you got the right value, not why an expression matched, failed to match, or matched too many things. This tool parses your expression into segments and explains each one in plain English, shows the exact absolute path of every match, and highlights those matches directly inside a collapsible tree view of your JSON, so you can see the shape of the document and the shape of your query at the same time.

Can I use this to build filter expressions like [?(@.price < 10)]?

Yes. Click any of the filter example chips to insert a working filter into the expression box, then edit the field name and value. The explanation panel breaks the filter condition down so you can see exactly what is being tested before you copy it into your code.

Does it handle deeply nested JSON and large arrays?

Yes, to any depth the browser's JSON.parse can handle. Recursive descent walks every node in the subtree, and the results list shows a running match count plus each match's path and value, capped for display at 500 rows so the page stays responsive on very large payloads while the evaluation itself still runs over the full match set.