JSONPath Tester Online — Evaluate Expressions, Filters & Recursive Descent
Free JSONPath tester and evaluator online: test $.store.book[*], recursive descent, slices, and filters like [?(@.price < 10)] against your JSON instantly in your browser.
Test a JSONPath before it ships.
Looking for a JSONPath tester or JSONPath evaluator online? Spoold's JSONPath Tester evaluates your expression against pasted JSON live and shows matched values, normalized paths, or both. It runs entirely in your browser.
What is JSONPath?
JSONPath is a query language for picking values out of a JSON document. A path starts at the root $ and walks down through keys, indexes, wildcards, and filters. Think of it as XPath for JSON: instead of looping and null-checking in code, you describe what you want in one short string. It was proposed by Stefan Goessner and is now standardized as RFC 9535.
Try it on this document
{
"store": {
"book": [
{ "category": "reference", "title": "Sayings of the Century", "price": 8.95 },
{ "category": "fiction", "title": "Sword of Honour", "price": 12.99 },
{ "category": "fiction", "title": "Moby Dick", "isbn": "0-553-21311-3", "price": 8.99 }
],
"bicycle": { "color": "red", "price": 399.99 }
}
}Syntax cheat sheet
| Syntax | Meaning |
|---|---|
| $ | Root |
| @ | Current node (inside filters) |
| .key / ['key'] | Child by name |
| [0] / [-1] | Index from start / end |
| [*] / .* | All children |
| ..key | Recursive descent |
| [0,2] / ['a','b'] | Union |
| [1:3] / [::2] | Slice with optional step |
| [?(@.price < 10)] | Filter |
Filters in depth
A filter [?(…)] is evaluated for every child of the node before it. Inside, @ is the child under test and $ is still the document root. You can compare with ==, !=, <, <=, >, >=; combine with &&, ||, and !; test existence with a bare path like [?(@.isbn)]; and match text with =~ /regex/.
Numeric & string comparison
$.store.book[?(@.price < 10 && @.category == 'fiction')] — types must match; comparing a number to a string never matches.
Existence & negation
[?(@.isbn)] keeps items with the key; [?(!@.isbn)] keeps those without it.
Regular expressions
[?(@.title =~ /^M/)] or [?(match(@.title, 'M.*'))] for whole-string matches and search() for partial ones.
Functions
length(@.tags) > 2 and count(@.*) == 4 test sizes without extra code.
Tip: use Paths output to debug
When a path returns the wrong thing, switch the output to Paths. Seeing $['store']['book'][2] tells you exactly which nodes matched, and a shorter prefix of your expression shows where it stops matching.
Recursive descent: powerful, but broad
$..price finds every price key at any depth, including the bicycle in the sample. That is convenient for exploration but can pick up unrelated keys in large documents. Once you understand the structure, switch to an explicit path such as $.store.book[*].price.
Where JSONPath is used
- API testing — Postman, REST Assured, Karate, k6, and Cypress plugins assert on response fields with JSONPath.
- Kubernetes —
kubectl -o jsonpathextracts fields from resources (with its own dialect). - Workflows & pipelines — AWS Step Functions, Logstash, and many ETL tools select fields with path expressions.
- Config & policy — Tools use paths to point at the exact value a rule applies to.
Dialect differences
JSONPath existed for years before RFC 9535, so libraries disagree on details: filter regex syntax, how missing keys behave in comparisons, whether length is a property or a function, and whether results are lists or single values. Use this tester to design the expression, then verify it in the exact library you ship (Jayway, JSONPath-Plus, Python jsonpath-ng, Go libraries, and so on).
How to test on Spoold
- Open /tools/json/path.
- Paste your JSON (or press Sample) and enter a path or click a sample chip.
- Read the result and match count; toggle Values / Paths / Both.
- Copy the result. The query is saved to History for later.
- Turn the extracted data into types with JSON → Types.
Related guides
Related search terms
Frequently asked questions
Is the JSONPath tester free?
What does $.. mean in JSONPath?
How do I select the last array element?
How do I filter by a value?
Can I query keys with spaces or dots?
Why does my path return an empty list?
JSONPath or jq?
Test a JSONPath expression
Paste JSON into the JSONPath tester online.
Related Tools
Related Articles
MCP Inspector Online — Read mcp.json and Tool Schemas
Inspect Model Context Protocol configs and tools/list payloads in the browser. See stdio commands, HTTP servers, env keys, and JSON Schema inputs for each tool.
Log Parser Online — JSON Lines, logfmt, and Access Logs
Parse JSON logs, logfmt, and Nginx or Apache combined access logs in the browser. Pick fields, preview the rows, and download CSV or JSON.
UTM Builder Online — Campaign Links, then a Short URL
Build a campaign URL with utm_source, utm_medium, and utm_campaign in the browser, then shorten it or turn it into a QR code.
Try It Now
Put this guide into practice with our free tools. No sign-up required.
Open JSONPath Tester