JSONPath Tester
Paste JSON, type a JSONPath expression and instantly see every matching value with its exact path. Use it to build and debug queries for API tests, kubectl output, Step Functions and other tools that select data from JSON.
Private by design: anything you enter is processed in your browser only. It is never uploaded to or logged on our servers. Share links carry the JSON and expression inside the link itself, so avoid sharing documents that contain secrets.
Click a path to use it as the expression.
About JSONPath
JSONPath is a query language for JSON, similar to what XPath is for XML. An expression starts at the root object $ and walks down through properties and array elements to select one or many values. It is used in API testing tools such as JMeter and Karate, in Kubernetes kubectl -o jsonpath output, in AWS Step Functions, in log processors and in many low-code integration platforms. It was standardised by the IETF as RFC 9535 in February 2024, almost two decades after Stefan Goessner's original 2007 article.
The basic building blocks are the child operator (.name or ['name']), the wildcard * that selects every child, and recursive descent .. that searches at any depth — $..author finds every author property no matter where it is nested. Arrays support indexes ([0]), negative indexes and Python-style slices ([-1:], [0:2]) and unions ([0,1]).
Filter expressions [?( … )] keep only the elements for which a condition is true. Inside the filter, the current element is referred to as @, so $..book[?(@.price < 10)] selects books cheaper than 10 and $..book[?(@.isbn)] selects books that have an ISBN. Comparisons, &&, || and ! can be combined.
This tester uses the jsonpath-plus library in its safe evaluation mode, which parses filter expressions instead of executing them as JavaScript. Every match is listed with its normalized path and JSON Pointer, so you can copy an exact location into code or click it to refine your query. Your JSON never leaves the browser.
If the expression reports invalid JSON, run the document through the JSON validator to pinpoint the syntax error, or format a minified API response with the JSON beautifier so its structure is easier to read. Working with YAML, CSV or XML? Convert it to JSON first with the data format converter, then query it here.
Reference Guide
JSONPath syntax cheat sheet. Click an example to try it on the current JSON:
| Syntax | Meaning | Example |
|---|
JSONPath compared with jq, the command-line JSON processor, using the sample bookstore document:
| Goal | JSONPath | jq |
|---|---|---|
| Whole document | $ | . |
| Nested property | $.store.bicycle.color | .store.bicycle.color |
| Field of every array item | $.store.book[*].author | .store.book[].author |
| First / last item | $.store.book[0], $.store.book[-1:] | .store.book[0], .store.book[-1] |
| Slice | $.store.book[0:2] | .store.book[0:2] |
| All values of an object | $.store.* | .store[] |
| Property at any depth | $..price | .. | .price? // empty |
| Filter by value | $.store.book[?(@.price < 10)] | .store.book[] | select(.price < 10) |
| Filter by existence | $.store.book[?(@.isbn)] | .store.book[] | select(.isbn) |
JSONPath only selects values, while jq can also reshape, compute and build new JSON. Reach for JSONPath when a tool expects it (JMeter's JSON Extractor, kubectl -o jsonpath, AWS Step Functions, API Gateway mapping templates) and for jq when you are transforming data in a shell pipeline.
Implementation differences: before RFC 9535, every library interpreted edge cases slightly differently. The RFC writes filters without the outer parentheses ($..book[?@.price < 10]) and adds the functions length(), count(), match(), search() and value(). This tester uses jsonpath-plus, which follows Goessner's original syntax, so write filters as [?(...)]. The ~ operator for property names is a jsonpath-plus extension and is not part of the standard. Test expressions in the library you will actually deploy with.
Example input
Expression: $.store.book[*].author
{
"store": {
"book": [
{ "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 },
{ "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 },
{ "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", "isbn": "0-553-21311-3", "price": 8.99 },
{ "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of the Rings", "isbn": "0-395-19395-8", "price": 22.99 }
],
"bicycle": { "color": "red", "price": 19.95 }
}
}
This sample loads automatically when you open the tool. Use Load Sample to bring it back.
Frequently Asked Questions
JSONPath is a query language for JSON, similar to XPath for XML. Expressions such as $.store.book[*].author select values from a JSON document.
The double dot is recursive descent: $..author finds every author property at any depth in the document.
Use a filter expression such as $..book[?(@.price < 10)], where @ refers to the current element being tested.
Related Tools
All Developer Utility Tools →File Meta Data Analyzer & EXIF Inspector
Inspect and analyze metadata from PDF, JPG, PNG, TIFF, BMP,...
Text Diff Checker
Compare two text blocks and highlight differences side by si...
Word Counter & Character Count Tool
Count words, characters, sentences, paragraphs, and estimate...
PDF Form Filler
Upload and fill interactive PDF form fields directly in your...
Color Converter
Convert colors between HEX, RGB, HSL, HSV, and CMYK formats...
Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal...