Back to Blog
10 min read
Guide

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.

By Spoold Editorial TeamReviewed for tool accuracy
Editorial Policy

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.

Open the JSONPath tester →

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 }
  }
}
$.store.book[*].titleAll titles
$.store.book[-1]Last book
$..priceEvery price in the document
$.store.book[?(@.price < 10)].titleCheap book titles
$..book[?(@.isbn)]Books with an isbn
$.store.book[0:2]First two books

Syntax cheat sheet

SyntaxMeaning
$Root
@Current node (inside filters)
.key / ['key']Child by name
[0] / [-1]Index from start / end
[*] / .*All children
..keyRecursive 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 jsonpath extracts 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

  1. Open /tools/json/path.
  2. Paste your JSON (or press Sample) and enter a path or click a sample chip.
  3. Read the result and match count; toggle Values / Paths / Both.
  4. Copy the result. The query is saved to History for later.
  5. Turn the extracted data into types with JSON → Types.

Related guides

Related search terms

jsonpath testerjsonpath evaluator onlinejsonpath onlinejsonpath filter expressionjsonpath cheat sheetjsonpath recursive descentjsonpath regexrfc 9535json query testerjsonpath vs jq

Frequently asked questions

Is the JSONPath tester free?
Yes—client-side, no sign-up. Your JSON and expressions never leave your browser.
What does $.. mean in JSONPath?
Two dots mean recursive descent: $..author selects every author key at any depth below the root.
How do I select the last array element?
Use a negative index: $.items[-1].
How do I filter by a value?
Use a filter selector, for example $.items[?(@.status == 'active')]. @ refers to the element being tested.
Can I query keys with spaces or dots?
Yes—use bracket notation with quotes: $['first name'] or $['a.b'].
Why does my path return an empty list?
Check key spelling, whether you need [*] for an array, and whether a filter compares different types. Try a shorter prefix of the path to see where it stops matching.
JSONPath or jq?
JSONPath selects values and is supported by many tools and libraries; jq is a full command-line language that can also reshape and compute. Use JSONPath for selection and jq for transformation.

Test a JSONPath expression

Paste JSON into the JSONPath tester online.

Try It Now

Put this guide into practice with our free tools. No sign-up required.

Open JSONPath Tester