Test and evaluate JSONPath expressions against your JSON data in real time. Enter your JSON, write a JSONPath query, and instantly see matching results with syntax highlighting and match count. Supports dot notation, bracket notation, wildcards, recursive descent, array slicing, and filter expressions. Free, runs entirely in your browser -- no data ever leaves your machine.
Results will appear here...
| Expression | Description | Example |
|---|---|---|
| $ | Root element -- the entire JSON document | $ -- selects the root object or array |
| .key | Child element -- access a property by name | $.store.name -- selects the "name" property of "store" |
| ['key'] | Bracket child -- same as dot notation, useful for special characters | $['store']['name'] -- equivalent to $.store.name |
| ..key | Recursive descent -- finds all occurrences of "key" at any depth | $..author -- all "author" values anywhere in the tree |
| [n] | Array index -- select element by position (zero-based) | $.items[0] -- first element, $.items[-1] -- last element |
| [*] | Wildcard -- select all elements of an array or all values of an object | $.items[*].name -- "name" of every item in the array |
| [start:end] | Array slice -- select a range (start inclusive, end exclusive) | $.items[1:4] -- elements at index 1, 2, 3 |
| [?(@.key)] | Existence filter -- select elements that have a specific property | $.items[?(@.discount)] -- items with a "discount" field |
| [?(@.key==val)] | Comparison filter -- select elements matching a condition | $.items[?(@.price>10)] -- items where price is greater than 10 |
| [?(@.key!=val)] | Not-equal filter -- select elements not matching a value | $.users[?(@.role!='admin')] -- non-admin users |
JSONPath expressions are evaluated as you type. See results instantly without clicking a button -- the output updates live with every keystroke in both the JSON and path inputs.
Results are displayed with color-coded syntax highlighting that distinguishes strings, numbers, booleans, null values, and object keys, making complex JSON output easy to read.
Use powerful filter expressions to select array elements based on conditions. Check for property existence, compare values with ==, !=, >, <, >=, and <= operators.
A comprehensive quick reference table is built right into the page. Look up JSONPath syntax, operators, and examples without leaving the tool or opening another tab.
JSONPath is a query language for extracting data from JSON documents, originally proposed by Stefan Goessner in 2007 as the JSON equivalent of XPath for XML. It provides a concise syntax for navigating nested JSON structures and selecting specific values, arrays, or objects without writing custom parsing code. JSONPath is widely used in API testing tools, data pipelines, configuration management, and anywhere developers need to extract specific data from complex JSON responses.
Writing JSONPath expressions can be tricky, especially for deeply nested or complex JSON structures. A JSONPath tester lets you experiment with different expressions and immediately see the results, making it much faster to build the correct query. Instead of writing code to test each expression, you can paste your JSON, try different paths, and refine your query interactively. This is particularly valuable when working with large API responses, Kubernetes manifests, Terraform state files, or any complex JSON data.
Paste your JSON into the input pane and type a JSONPath expression in the path field. The tool parses your JSON, evaluates the JSONPath expression against it, and displays the matching results in real time with syntax highlighting. The match count shows how many values were found. Everything runs entirely in your browser -- no data is ever sent to a server. Use the preset examples to quickly explore common JSONPath patterns, or consult the built-in cheatsheet for syntax reference.
$ (representing the root element) and use dot notation or bracket notation to traverse the JSON structure. It supports wildcards ([*]), recursive descent (..), array slicing ([start:end]), and filter expressions ([?(@.key==value)]). JSONPath was originally proposed by Stefan Goessner in 2007 and has since been adopted by many tools and libraries across different programming languages.
$ to represent the root of your JSON document. Use dot notation ($.key) or bracket notation ($['key']) to access object properties. Use [n] for array indices (zero-based), [*] to select all elements, [start:end] for array slices, ..key for recursive descent (finding a key anywhere in the tree), and [?(@.key)] for filter expressions. For example, $.store.book[*].author selects the author of every book in the store, and $.store.book[?(@.price<10)] selects books cheaper than 10.
$ for the root element (XPath uses /), dot notation for child access (XPath uses /), .. for recursive descent (XPath uses //), and [?()] for filters (XPath uses []). JSONPath is simpler because JSON has fewer node types than XML -- there are no attributes, namespaces, processing instructions, or text nodes. JSONPath also uses JavaScript-style array indexing (zero-based) and supports negative indices.
$..key) searches the entire JSON tree for all occurrences of the specified key, regardless of how deeply nested they are. For example, $..name will find every "name" property at every level of the JSON structure. This is useful when you want to extract values from deeply nested or inconsistently structured JSON without specifying the full path. Be aware that recursive descent can return many results for large documents, as it traverses every object and array in the tree.
[?(@.key op value)] to select array elements that match a condition. The @ symbol refers to the current element being evaluated. You can check for property existence with [?(@.key)], or use comparison operators: == (equals), != (not equals), > (greater than), < (less than), >= (greater or equal), and <= (less or equal). For example, $..book[?(@.price<10)] selects all books with a price less than 10, and $..book[?(@.isbn)] selects books that have an ISBN property.
[start:end] to select a range of elements from an array. The start index is inclusive and the end index is exclusive, similar to Python slicing. For example, $[0:3] selects the first three elements (indices 0, 1, 2). You can omit start to begin from the beginning ($[:3]) or omit end to go to the end ($[2:]). Negative indices count from the end of the array, so $[-2:] selects the last two elements. This is useful for pagination, selecting subsets, or working with ordered data.
Check out our other free developer tools. Format JSON, generate Kubernetes manifests, parse AWS ARNs, decode JWTs, and more -- all from your browser with no sign-up required.