JSONPath Tester
Run a JSONPath expression on the JSON you paste and see the matching values, their paths and the number of matches
Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.
Did this tool do the job?
Thanks, your feedback came through.
How it works
JSONPath picks the part you need out of a large JSON document with a one-line expression; Postman tests, API gateways and kubectl -o jsonpath all use it. Paste your JSON into the left pane and type the expression; the result on the right updates as you type. Every expression starts with $, the root of the document: $.store.book[0].title returns the title of the first book, and $..author returns every author field at any depth. A filter in square brackets, [?(@.price<10)], keeps only the items that meet the condition; @ is the item being checked. On the sample JSON, $.store.book[?(@.price<10)].title returns two titles: Sayings of the Century and Moby Dick. If you forget the leading $, the tool adds it and says so below the result. No match gives an empty array; check the upper and lower case of the names. The paths view shows the exact address of each value, which tells you the key chain to use in your code. JSON always writes decimals with a point (8.95), so write numbers in filters the same way.
This tool is also known as jsonpath tester, jsonpath online, jsonpath evaluator, jsonpath examples, jsonpath filter.
What is JSONPath?
JSONPath is a short query language for selecting values inside a JSON document; it does for JSON what XPath does for XML. $ is the root, a dot steps into a field, [0] picks an array item, [*] all items, .. every depth, and [?(...)] a filter. It has been a standard since 2024 as RFC 9535, and Postman, Kubernetes and many API tools use it.
What is Filter expression?
A filter keeps only the array items that meet a condition: [?(@.price<10)] keeps the items with a price below 10. @ stands for the item being tested, and you can use ==, !=, <, >, && and ||. A filter with no comparison, such as [?(@.isbn)], keeps the items where the field exists and is not empty.
What is the difference between JSONPath and JSON Pointer?
JSON Pointer (RFC 6901) is the exact address of one value: /store/book/0/author always returns at most one result and has no wildcards or filters; it is used in JSON Patch and in JSON Schema $ref. JSONPath is a query language: a single expression like $..author can return many values, and you can write conditional filters. Use JSON Pointer to point at or change one value, and JSONPath to search and filter data.
Common JSONPath expressions (with the sample JSON)
You can try every expression below on the sample JSON on this page; the sample is the bookstore document Stefan Goessner used when he described JSONPath in 2007. Most tools in use today accept his syntax.
- $..author → the four authors (.. searches at every depth)
- $.store.book[?(@.price<10)].title → the two titles priced under 10
- $..book[?(@.isbn)] → the two books that have an isbn field
- $..book[-1:] → the last book; $..book[0,1] → the first two books
- $..book.length → the number of books (4)
- $..price → five prices: four books and the bicycle
Honest limits: differences from RFC 9535, and safety
JSONPath became a standard in 2024 as RFC 9535. This tool uses the widely used jsonpath-plus library and follows the older Goessner syntax: filters are written with parentheses ([?(@.price<10)]; in the RFC they are optional), JavaScript properties such as .length work, and the RFC functions match() and search() are not available. The same expression can return slightly different results in another library, especially when a filter compares text.
Filter expressions do not run through the browser's eval; the library uses its own safe interpreter, so no code can be run from an expression. Looking up a field that does not exist inside a filter (@.publisher.name when there is no publisher) counts as no match, not as an error.
Frequently asked questions
How do I test a JSONPath expression?
Paste your JSON into the left pane on this page and type the expression into the JSONPath box. Matching values show up on the right at once, and the line below says how many matches there are. Set Result to Matching paths to see the exact address of each value inside the JSON.
What is the difference between $. and $..?
A single dot goes down one level: $.store.bicycle returns only the bicycle field of the store object. Two dots search at every depth: $..price returns the prices of the books and of the bicycle, five values in total. Use .. when you do not know where a field sits.
How do I compare text in a filter?
Put the text in quotes: $.store.book[?(@.category=='fiction')].title returns the three fiction titles. Join several conditions with && (and) or || (or): [?(@.category=='fiction' && @.price<15)] returns Sword of Honour and Moby Dick. If a quote is left open, the tool tells you.
Is my JSON sent to a server?
No. Reading the JSON and running the expression both happen in your browser, so you can safely test a response that contains API keys or customer data.