JSONPath Tester
Test and execute JSONPath expressions in real-time. Extract data from JSON using wildcards (*), recursive descent (..), array slices ([::]), and filter expressions ([?()]).
JSONPath Reference
Operators
| Operator | Description |
|---|---|
| $ | Root element |
| @ | Current element (in filters) |
| * | Wildcard: all elements |
| .. | Recursive descent: all descendants |
| . | Child element |
| ['key'] | Child element with bracket notation |
Array Operators
| Operator | Description |
|---|---|
| [n] | Array element at index |
| [start:end] | Array slice |
| [start:end:step] | Array slice with step |
| [i,j,k] | Multiple array indices |
| [?(@.key)] | Filter: elements with key |
| [?(@.key>value)] | Filter: comparison operators |
Filter Operators
| Operator | Description | Example |
|---|---|---|
| == | Equals | [?(@.price==10)] |
| != | Not equals | [?(@.category!='fiction')] |
| <, > | Less/greater than | [?(@.price<10)] |
| <=, >= | Less/greater or equal | [?(@.rating>=4)] |
| =~ | Regex match | [?(@.name=~/pattern/)] |
| &&, || | Logical AND/OR | [?(@.price<10 && @.rating>4)] |
| in | Array membership | [?(@.category in ['A','B'])] |
About JSONPath
JSONPath is a query language for JSON, similar to XPath for XML. It allows you to extract specific parts of a JSON document without having to parse the entire structure manually. JSONPath is particularly useful when working with complex, nested JSON data where you need to access specific fields or filter elements based on conditions.
Originally proposed by Stefan Goessner in 2007, JSONPath has become a widely adopted standard for JSON querying. It's commonly used in REST APIs, data transformation pipelines, and testing frameworks to validate and extract JSON data.
This tool supports most JSONPath operators including wildcards (*), recursive descent (..), array slices, union operators, and filter expressions with comparison and logical operators. Simply paste your JSON data, enter a JSONPath expression, and see the results instantly.
Related JSON Tools
Features
Real-time Execution
Automatically executes JSONPath expressions as you type, with instant visual feedback on query performance and match counts.
Filter Expressions
Full support for filter expressions with comparison operators (==, !=, <, >), logical operators (&&, ||), and regex matching.
Recursive Descent
Search through all levels of nested JSON using the recursive descent operator (..) to find matches anywhere in the document structure.
Array Slicing
Support for array slicing with start, end, and step parameters, plus negative indices and multiple index selection.
Reference Guide
Built-in JSONPath reference table showing all supported operators, array operations, and filter expressions with examples.
Example Queries
Quick-access buttons with common JSONPath expressions to help you learn and test different query patterns instantly.
How to Use
Enter JSON Data
Paste your JSON data in the left panel or click "Load Sample" to use the built-in sample JSON with book store data.
Write JSONPath Expression
Type a JSONPath expression in the input field. Use $ for root, . for child access, and [] for array operations.
Execute Query
Click "Execute" or enable "Auto-execute on input" to see results instantly. Match count and execution time are displayed below.
Review & Copy Results
View matched results in the right panel. Copy individual values or the entire result set using the copy button.