JSONPath Tester – Query JSON Online
Find values inside JSON with a JSONPath expression like $.store.book[*].title, with filters, wildcards and deep search.
JSON Input
Matches
What Is JSONPath?
JSONPath is a small query language for JSON, like XPath is for XML. It lets you point at the exact values you need, for example every price in a big API response, without writing code. It is used in tools like Postman, Kubernetes (kubectl), AWS and many JSON libraries.
How to Use the JSONPath Tester
- Paste your JSON, or click Sample for the bookstore example.
- Type a JSONPath expression, or click one of the examples.
- Click Run Query, or press Ctrl + Enter, to see every match.
- Turn on Show paths to see where each match is.
JSONPath Cheat Sheet
$the root of the document.nameor['name']a child by name[0],[-1]an array item (first, last)[*]or.*all children..namesearch at every level[0,2]several items,[1:3]a range[?(@.price < 10)]a filter;@is the current item
More examples
$.store.book[*].title: All book titles$..price: Every price$.store.book[0]: First book$.store.book[-1].author: Author of the last book$..book[?(@.price < 10)].title: Books under 10$..book[?(@.category == 'fiction')].author: Fiction authors$..book[?(@.isbn)]: Books that have an ISBN
JSONPath Syntax Cheat Sheet
$: the root of the document..keyor['key']: a child by name. Use the bracket form for keys with spaces or dashes.[0]: an array item by position (0 is the first);[-1]is the last.[*]: every item or every child...: search at any depth, for example$..price.[0:2]: a slice, the first two items.[?(@.price < 10)]: a filter;@is the current item.
Worked Example
{ "store": { "books": [
{ "title": "Learn JSON", "price": 12.99, "author": "Emily Clark" },
{ "title": "XML Basics", "price": 9.5, "author": "James Smith" },
{ "title": "APIs", "price": 15, "author": "Emily Clark" }
] } }$.store.books[0].title → "Learn JSON" $.store.books[*].title → "Learn JSON", "XML Basics", "APIs" $..author → "Emily Clark", "James Smith", "Emily Clark" $.store.books[?(@.price < 13)].title → "Learn JSON", "XML Basics"
Where JSONPath Is Used
- API testing in Postman, REST Assured and Karate to check values in responses.
- Kubernetes:
kubectl get pods -o jsonpath='{.items[*].metadata.name}'. - Data pipelines and no-code tools that pick fields out of webhook payloads.
- Databases: PostgreSQL, MySQL and SQL Server have JSON path functions to query JSON columns.
Frequently Asked Questions
What is JSONPath used for?
JSONPath picks values out of JSON, like XPath does for XML. It is used in Postman tests, kubectl, AWS Step Functions and many libraries.
Does it support filters?
Yes. Use [?(@.price < 10)], compare with ==, !=, <, <=, >, >=, combine with && and ||, and check that a field exists with [?(@.isbn)].
What does .. mean?
Two dots search at every level. $..price finds every price, no matter how deep it is.
Is my JSON uploaded?
No. Queries run in your browser.