JSONPath Tester Online
| Expression | Description | Example |
|---|---|---|
| $ | Root of the JSON document | $ |
| .key | Child member operator | $.store.name |
| ['key'] | Bracket notation (for keys with spaces) | $['store name'] |
| [n] | Array subscript (0-indexed) | $.items[0] |
| [-n] | Array subscript from end | $.items[-1] |
| [*] | Wildcard — all items/properties | $.items[*] |
| [a:b] | Array slice from a (inclusive) to b (exclusive) | $.items[0:3] |
| .. | Recursive descent — search all descendants | $..name |
| [?(@.field op val)] | Filter expression (==, !=, <, >, <=, >=) | $..book[?(@.price < 10)] |
Extracting specific attributes from large data documents requires an efficient, query-driven path selector. Our jsonpath tester online tool allows developers to write, evaluate, and refine expressions against live payloads with instant visual feedback. Operating as a real-time json path query tester, the engine highlights matching array elements, sub-objects, and scalar values as you type. Whether you are testing filter predicates, analyzing expression evaluator logic for API automated tests, or evaluating jsonpath vs xpath query standards, our privacy-first browser utility streamlines path debugging without sending data over network servers.
Guide
About JSONPath
What is JSONPath?
JSONPath is a query language for JSON, analogous to XPath for XML. It was defined by Stefan Goessner in 2007. A JSONPath expression navigates a JSON structure and returns matching values. It's used in REST API testing (Postman, REST Assured), JSON Schema validators, and data transformation pipelines.
What is recursive descent (..)?
The .. operator performs a deep search across the entire JSON tree. $..price returns every value named price at any nesting level — not just direct children of the root. It's the most powerful and frequently used advanced operator.
How do filter expressions work?
A filter like [?(@.price < 10)] selects array items where the condition is true. @ refers to the current item. Supported operators are ==, !=, <, >, <=, >=. String comparisons use == with a quoted value: [?(@.category == 'fiction')].
Where is JSONPath used in practice?
JSONPath is used in Postman assertions, AWS EventBridge rules, AWS Step Functions, Kubernetes admission webhooks, JSON Schema's $ref pointers, Grafana alerting, and dozens of API testing tools. Understanding JSONPath is a practical skill for backend and DevOps engineers.
JSONPath was created to solve a simple problem: given a large JSON document, how do you extract specific values without writing custom traversal code? The answer is a compact expression language that describes a path through the document. $.store.book[0].title reads: start at the root ($), navigate to store, then to book, take the first element ([0]), and return title.
This tool implements the core JSONPath operators entirely in JavaScript with no external dependencies. It handles the operators developers use most: dot notation, bracket notation, array subscripts, negative indices (last element), slices, the wildcard [*], recursive descent .., and filter expressions with ==, !=, <, >, <=, and >= comparisons against string and number literals.
Worked example: Given {"users": [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 22}]}, the expression $.users[?(@.age >= 25)].name returns ["Alice"]. The filter selects only users where age is 25 or more, then extracts the name property from those matches. This is the kind of query you might use in a Postman test script, an AWS EventBridge rule, or a Kubernetes admission webhook.
Each match shows its full path from root so you can understand exactly where in the document the value was found. This is particularly useful when using recursive descent (..) which may find matches at multiple different depths. Click a preset expression above to see the canonical Goessner bookstore example data in action, then swap in your own JSON and query. Use the JSON Tree Viewer to explore the structure of your JSON before writing the path expression. Once you've confirmed your expression, use the JSON Formatter to validate and inspect the full document.
JSONPath vs jq — when to use which?
Both JSONPath and jq extract values from JSON, but they operate in different environments. JSONPath runs in the browser, in Postman, in AWS Step Functions, and in dozens of API tools — it's the standard for declarative JSON selection in configuration and rule engines. jq is a command-line tool that's far more powerful (it supports transformation, reduction, and arbitrary scripting), but it requires installation and a terminal. Use this JSONPath Tester when you're building a Postman assertion, configuring an EventBridge rule, or learning the syntax interactively. Use jq when you need to transform or restructure JSON in a shell script or CI pipeline. If you need to navigate the same JSON visually first, the JSON Tree Viewer and JSON Diff Checker are natural starting points before you write a path expression.