Skip to content
TypeParser
All tools

JSONPath Tester

Run JSONPath queries against JSON.

beats jsonpath.com edge: Filter expressions + recursive descent + slicing
JSON
JSONPath
matches
paste JSON + path
Guide

About JSONPath Tester

Test JSONPath queries against your JSON live. Wildcards, array slicing, recursive descent, filter expressions — all supported. Each match shows its path and value, and the matched substrings highlight in the source for visual confirmation. Useful when extracting data from large API responses without writing code.

What JSONPath gives you

A way to extract values from a JSON document by path, without writing code. The syntax is dense but learnable in 20 minutes:

ExpressionMeaning
$The root
.foo or ['foo']Property foo
[0], [-1]Array index (negative counts from end)
[0:5]Array slice
*All elements
..fooRecursive descent — every foo at any depth
[?(@.age > 18)]Filter — items where the condition holds
[1, 3, 5]Specific indices

How to use the tester

  1. Paste JSON in the upper pane.
  2. Type a JSONPath query in the input.
  3. Watch matches appear in the result panel; each result shows the resolved path and value.
  4. Click a result to highlight the source location.

Common workflows

Extract from a large API response. A 5 MB response with the data you need three levels deep. $.data.items[?(@.status == 'active')].id pulls just the IDs.

Verify a webhook payload contains expected fields. $.event.user.email returns the email if present, empty otherwise. Quick sanity check before writing the parser.

Map fields for an ETL. Find the path to each desired field, write them down, transcribe to your transformation code.

Build assertions for tests. A test that says expect($.user.id).toBe('123') is more readable than walking the object manually. Some test runners accept JSONPath directly.

Why a tester beats a one-shot script

A throwaway script forces a context switch. The tester gives you immediate feedback — type, see results, iterate. Once the path is right, copy it into your real code. The same skill scales from one-off API debugging to production query writing.

Frequently asked questions

What is JSONPath?
A query language for JSON, modeled after XPath. Standardized as RFC 9535 (Feb 2024). The dollar sign $ is the root; dots traverse properties; brackets index arrays. Wildcards (*), recursive descent (..), and filters ([?(...)]) build expressive queries.
How does it differ from JMESPath?
JMESPath is a different (also JSON-targeted) query language used by AWS CLI. Closer to a functional pipeline. JSONPath is more XPath-like. Both extract data; pick by what your downstream tooling expects.
Can I use filter expressions?
Yes — $.users[?(@.age > 18)] selects all users older than 18. @ is the current element; standard comparisons (==, !=, <, >, <=, >=) and logical (&&, ||, !) work.
What does <code>..</code> do?
Recursive descent. $..price finds every property named price at any depth. Useful when the structure is nested and you do not want to write the full path.
Can I extract multiple paths at once?
Use $..[?(@.id == 1 || @.id == 2)] with logical operators. For unrelated selections, run two queries and merge results in code.
Is the query running in my browser?
Yes — all parsing and evaluation happen client-side. Your JSON never leaves the page.

Related tools

Last updated: 2025-01-15