JSONPath is a query language for extracting data from JSON documents, similar to XPath for XML. It lets you navigate nested structures and select specific values using path expressions. This tool evaluates JSONPath expressions against your JSON data and displays matched results. Supports root ($), child access ($.key), recursive descent ($..), array indexing ($[0]), wildcards ($[*]), and slicing ($[0:3]).
Test JSONPath expressions against JSON data. Enter your JSON and a JSONPath query to see matched results.
| # | Type | Value |
|---|---|---|
| 0 | string | "Nigel Rees" |
| 1 | string | "Evelyn Waugh" |
| 2 | string | "Herman Melville" |
| 3 | string | "J. R. R. Tolkien" |
JSONPath Syntax Reference
| Expression | Description | Example |
|---|---|---|
| $ | Root object | |
| .key | Child property | |
| [n] | Array element by index | |
| [*] | All array elements | |
| ..key | Recursive descent (search all levels) | |
| [start:end] | Array slice | |
| [start:] | Array slice from start | |
| [:end] | Array slice to end |
Paste your JSON data into the input area and enter a JSONPath expression in the query field. The tool evaluates the expression and displays matched results as formatted JSON. Supported operations: $ (root), $.key (child access), $..key (recursive descent), $[0] (array index), $[*] (wildcard), and $[0:3] (array slicing).
JSONPath testing is invaluable for developing and debugging data extraction queries for API response processing, building JSONPath-based data transformations in ETL pipelines and integration platforms, configuring JSONPath selectors in monitoring and alerting systems (like Grafana and Datadog), writing JSONPath filters for Kubernetes kubectl jsonpath output formatting, extracting specific fields from large API responses during development, creating JSONPath expressions for use in Postman test scripts and Newman automation, and learning JSONPath syntax interactively with immediate visual feedback.
JSONPath syntax follows the Goessner specification. The root element is $, dot notation accesses children ($.store.book), bracket notation supports quoted keys ($['store']['book']), wildcards (*) match all elements, recursive descent (..) searches all descendants, and array slicing ($[0:3]) selects index ranges. Note: filter expressions ($[?(@.field > value)]) and union operators ($[0,1,2]) are not supported in this implementation.
JSONPath is a query language for JSON, analogous to XPath for XML. Just as XPath navigates XML document trees with expressions like /store/book[price<10], JSONPath navigates JSON with expressions like $.store.book[?(@.price<10)]. Both use path expressions, wildcards, and predicates to select nodes from hierarchical data.
Common expressions include: $ (root element), $.key or $['key'] (child access), $..key (recursive search for all occurrences of 'key'), $[0] (first array element), $[*] (all array elements), $[-1] (last element), $[0:3] (array slice), and $[?(@.field == 'value')] (filter by condition).
This tool supports root ($), child access ($.key, $['key']), recursive descent ($..key), array indexing ($[0], $[-1]), array slicing ($[0:3]), and wildcards ($[*]). Filter expressions ($[?()]) and union operators are not currently supported.
Transform, format, generate, and encode data instantly. Private, fast, and always free.
Browse All Tools