JSON Path Tester
Test a JSONPath-style query against JSON and see the matching values instantly — with a clearly documented, supported syntax subset.
Use the tool ↓Your data is processed locally in your browser and is not uploaded to our servers.
$ (root), .key, ['key'], [index], [*] (wildcard), ..key (recursive descent).
Not supported: filter expressions [?(...)], slices [1:3], or script expressions — this is a documented subset, not full JSONPath.
About this tool
JSONPath does for JSON roughly what a file path does for a filesystem — a compact string notation for pointing at a specific location (or set of locations) inside a document, without writing a loop or a chain of property accesses by hand. $.store.books[0].title says exactly one thing: start at the root, go into store, then books, take the first element, then its title. That's often faster to write and test than the equivalent JavaScript, and it's genuinely useful independent of any particular programming language — for exploring an unfamiliar API response, for documenting exactly which field a bug report is about, or for configuring a system (many logging and monitoring tools accept JSONPath-style expressions to extract specific fields).
The full JSONPath specification includes features well beyond simple property access — filter expressions that select array items matching a condition, array slicing, and script expressions that can run arbitrary logic against each candidate node. Implementing all of that correctly and securely (script expressions in particular are exactly the kind of feature that turns into a code-injection risk if handled carelessly) is a meaningfully large undertaking, and pulling in a full third-party JSONPath library would work against this hub's goal of staying lightweight and dependency-free.
So this tool implements a clearly documented subset: root access ($), dot-notation property access (.key), bracket notation for quoted keys (['key']) and numeric indices ([index]), a wildcard for "every item or property" ([*]), and recursive descent to find a key anywhere below the current point regardless of depth (..key). That covers the large majority of everyday JSONPath use — pulling a specific field out of a nested structure, mapping over an array, or finding every occurrence of a key without knowing exactly where it sits in the tree — without pretending to support syntax it doesn't. If you type an unsupported construct like a filter expression, the tool tells you clearly rather than silently returning nothing or a wrong answer.
The result is always an array of every matching value, since a path with a wildcard or recursive descent can legitimately match more than one location — even a path that matches exactly one value returns it inside a single-item array, for consistency. Everything runs locally in your browser; nothing you paste is sent anywhere.
How to use it
Paste your JSON
Or load the built-in sample data to try the tool immediately.
Write a path, or click a sample
Start with $ and use the supported syntax documented below the tool.
Read the matching value(s)
Results update as you type, shown as a JSON array of every match.
Example
$.store.books[*].title
["Book A", "Book B", "Book C"]
Common use cases
Exploring an API response
Quickly pull out a specific nested field without writing code.
Documenting a bug report
Reference the exact path to a problematic field precisely.
Extracting a list of values
Pull every title, ID, or name from an array of objects in one expression.
Finding a key regardless of depth
Use recursive descent to locate a key without knowing its exact nesting.
Configuring log/monitoring extraction
Test a path before using it in a tool that extracts fields via JSONPath.
Teaching JSON traversal
Show how a path expression maps onto a specific location in the tree.