JSONPath Tester
Test JSONPath expressions against JSON data instantly in your browser.
$ root |
. child |
.. deep |
* wildcard |
[n] index |
[start:end] slice |
[?(@.price < 10)] filter
Common JSONPath Examples
| Expression | Description |
|---|---|
| $ | Root element |
| $.name | Property "name" at root |
| $.items[0] | First element of "items" array |
| $.items[*] | All elements of "items" array |
| $.items[*].id | "id" field from every item |
| $..price | All "price" values anywhere in document |
| $.items[-1:] | Last element of "items" |
| $.items[0:2] | First two elements (slice) |
| $.items[?(@.active == true)] | Items where "active" is true |
| $.items[?(@.price < 10)] | Items with price less than 10 |
About JSONPath
JSONPath is a query language for extracting data from JSON documents. It was introduced by Stefan Goessner in 2007, inspired by XPath for XML. JSONPath is now embedded in many tools and platforms — Postman uses it for test assertions, AWS Step Functions uses it for state machine data flow, and many REST API frameworks use it for response filtering.
Unlike XPath (which has a formal W3C specification), JSONPath has multiple slightly different implementations.
This tool implements the most widely used behavior based on the original Goessner specification, including
recursive descent (..), array slicing, and filter expressions with comparison operators
(==, !=, <, >, <=, >=).
Frequently Asked Questions
What is JSONPath?
JSONPath is a query language for JSON, similar to XPath for XML. It lets you extract specific values from a JSON document using path expressions. It is widely used in Postman, AWS Step Functions, and API testing frameworks.
What does the $ symbol mean in JSONPath?
$ represents the root element. All JSONPath expressions start with $.
For example, $.store.book[0].title navigates root → store → book array → first item → title.
How do filter expressions work?
Filter expressions use [?(@.property operator value)]. For example,
$.store.book[?(@.price < 10)] returns all books with price less than 10.
The @ symbol refers to the current item in the array.
Is this tool safe for sensitive JSON data?
Yes. All evaluation happens in your browser using JavaScript. Your JSON data is never sent to any server, stored, or logged.
What is the difference between dot and bracket notation?
Both access properties but bracket notation handles special characters.
$.store.book[0].title and $['store']['book'][0]['title'] are equivalent.
Use bracket notation when property names contain spaces, hyphens, or special characters.