Use the free JSONPath Tester below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.
Test JSONPath Queries Against Real JSON
JSONPath is a query language for JSON, the way a search filter is a query for a list. Instead of digging through a large document by hand, you write a short expression and get back exactly the values that match. The expression $.store.book[*].author returns every book author. The expression $.store.book[0].title returns the first book title. The expression $..price returns every price at any depth. This tool lets you try those queries instantly, against your own JSON, without installing anything.
Paste the JSON, type the query, and press Run. The tool shows how many values matched and lists each match as JSON. A count of zero is also useful information: it means the path does not exist in this document, which usually means a typo in the query or a wrong assumption about the structure. Either way, you learn something in seconds.
The Queries You Will Use Most
Most everyday queries use a small set of pieces. A dot followed by a name selects a field: $.store.bicycle.color. A number in brackets selects an array item: $.store.book[0]. A star selects everything: $.store.book[*] returns every book, and $..price searches recursively for every price anywhere in the document. A negative index counts from the end, so $.store.book[-1] is the last book.
Filters are the powerful piece. A filter looks like $..book[?(@.price < 10)] and returns only the books cheaper than ten. The @ symbol means the current item being tested. Filters can compare numbers, test equality of strings, and combine conditions. This tool runs filter queries through the jsonpath-plus library, which implements the full filter syntax, while simple paths also work through a built-in evaluator if the library is ever blocked. You get the same answers either way for the common cases.
How to Build a Query Step by Step
Start from the root and add one piece at a time. First type $ and run it: you should get the whole document back. Then add the first field, like $.store, and check that the result is the store object. Then add the next piece, like $.store.book, and confirm you see the array. Then add the index or wildcard. At each step the result tells you whether the path so far is right, so a mistake shows up immediately instead of hiding at the end of a long expression.
When a query returns nothing, check three things. First, spelling: JSON keys are case-sensitive, so Book and book are different fields. Second, structure: if book is an array, you need an index or a wildcard before you can reach author. Third, depth: if the field you want is nested deeper than you thought, the recursive operator .. will find it, and then you can write the exact path once you see where it lives.
Real Uses for JSONPath
Developers use JSONPath in several places. In tests, a query checks that an API response contains the expected value without comparing the whole document. In data pipelines, a query extracts one field from thousands of records. In configuration files, a query pulls a setting out of a large document. In debugging, a query answers a quick question: does this response contain a price above a threshold, and if so, which items?
For all of these, the habit is the same: write the query here first, confirm the matches, then copy the query into your code. Testing the query separately saves a round of debugging in your application, where a wrong query is harder to see because the failure looks like missing data rather than a bad expression.
Common Mistakes
The most common mistake is forgetting that array indexes start at zero, so the first item is [0], not [1]. The second is using dot notation for keys that contain spaces or special characters: those need bracket notation with quotes, like $[“my key”]. The third is expecting a filter to work on a field that is not present on every item: items missing the field simply do not match, which is usually what you want, but it can surprise you if you expected an error instead.
Another mistake is confusing JSONPath with JSON Pointer or with jq. They look similar but differ in syntax. JSONPath starts with $ and uses dots and brackets. JSON Pointer uses slashes and starts empty or with a slash. jq is a separate command-line language with its own filters. If a query that works in jq fails here, check the syntax against JSONPath rules rather than assuming the two languages agree.
Privacy
Your JSON and your queries never leave your browser. The tool runs locally, with the jsonpath-plus library loaded from a public CDN for the full filter syntax. No account is needed, and nothing you paste is stored anywhere.
