JSONPath Tester
Write and test JSONPath expressions against live JSON — see every match with its exact path.
Related Tools
JSONPath Quick Reference
| Expression | Meaning |
|---|---|
| $ | Root of the document |
| $.foo | Child property foo |
| $.foo.bar | Nested property |
| $.items[0] | First array element |
| $.items[-1:] | Last array element (slice) |
| $.items[1:3] | Elements at index 1 and 2 |
| $.items[*] | All array elements |
| $..name | All name properties, any depth (recursive) |
| $.items[?(@.active)] | Filter: elements where active is truthy |
| $.items[?(@.price < 50)] | Filter: elements where price < 50 |
| $.items[?(@.role == 'admin')] | Filter: elements where role equals 'admin' |
| $.items[*].tags[0] | First tag of every item |
What is JSONPath?
JSONPath is a query language for extracting values from JSON structures — the JSON equivalent of XPath for XML. It is used in API testing (Postman, REST-assured), workflow automation (n8n, Make, Zapier), cloud infrastructure (AWS IAM, Kubernetes JSON patches), and anywhere developers need to pinpoint a specific value inside a nested JSON document without writing traversal code.
This tool uses the jsonpath-plus library, which implements the RFC 9535 draft specification with extensions. Results update live as you type, and each match shows its canonical bracket-notation path so you know exactly where in the structure it was found.
Frequently Asked Questions
- What is JSONPath?
- JSONPath is a query language for JSON, analogous to XPath for XML. It lets you extract specific values from a JSON structure using path expressions. $ represents the root, . is child access, [*] selects all array elements, .. is recursive descent, and [?(@.field > value)] is a filter expression. JSONPath is widely used in API testing tools, AWS IAM policies, Kubernetes, n8n, and many workflow automation platforms.
- What does $ mean in a JSONPath expression?
- $ is the root of the JSON document. All valid JSONPath expressions start with $. $.store means 'the store property of the root object'. $..name means 'all name properties anywhere in the document at any depth'. $.users[0] means 'the first element of the users array'.
- How do filter expressions work?
- Filter expressions use the [?(@.field operator value)] syntax. @ refers to the current element. Examples: [?(@.price < 50)] matches items where price is less than 50; [?(@.active)] matches items where active is truthy; [?(@.role == 'admin')] matches items where role equals 'admin'. Supported operators are == != < <= > >= and string comparisons.
- What is the difference between . and .. in JSONPath?
- The single dot . is child access — it only looks one level deep. $.store.name gets the name property directly inside store. The double dot .. is recursive descent — it searches all levels. $..name finds every name property anywhere in the document, no matter how deeply nested.
- How do array slices work?
- Array slices use [start:end:step] notation (like Python). $.items[0:3] gets the first 3 elements. $.items[-1:] gets the last element. $.items[::2] gets every other element. Negative indexes count from the end — [-1] is the last element, [-2:] is the last two elements.
- Where is JSONPath used in real tools?
- JSONPath appears in: AWS IAM and EventBridge rule patterns, Kubernetes JSON patches, n8n and Make (Integromat) workflow expressions, Postman test scripts, REST-assured Java testing, JMESPath (AWS CLI), jq (command-line JSON), and most API testing platforms. The exact dialect varies slightly between tools — this tester uses the jsonpath-plus library which follows the RFC 9535 draft specification.
- What does the path output mean?
- Each match shows its path in bracket notation: $['store']['books'][0]['title']. This is the canonical path to that value from the root. You can use these paths to pinpoint exactly where in a deeply nested structure a matched value lives, which is especially useful when debugging webhook payloads or API responses.
- Can I use this with n8n or Make expressions?
- n8n uses a JSONPath-like syntax for referencing fields from previous nodes: {{ $json.users[0].name }}. Make uses similar dot-notation. To find the right path for your data, paste your node output JSON here and use $.users[0].name style expressions. The path shown in the results (minus the $ prefix) is usually what you need in those tools.
About This Tool
JSONPath Tester is built for developers who work with API responses, webhook payloads, and workflow automation platforms. The eight example expressions cover the patterns that appear most in real-world use — filtering arrays, recursive descent, and slices. Click any example to load it instantly. All evaluation is browser-side using jsonpath-plus; no data leaves your device.