What Is JSONPath?
JSONPath is a query language for JSON, the same role XPath plays for XML. Instead of writing manual traversal code to dig a value out of a deeply nested structure, a JSONPath expression describes the path to that value directly: $.store.books[0].title reaches straight into an array of book objects and pulls out the title of the first one. This jsonpath tester lets you write and test that expression, in your browser, and see the exact matched results and how many values it found.
How to Use This JSONPath Tester
Paste your JSON into the left panel, then type a JSONPath expression into the field above it, or click one of the example chips to see a real query run against sample data. Results update live in the right panel as you type, along with a match count badge. JSON syntax errors and JSONPath expression errors are reported separately and labeled clearly, so you always know which side of the query actually has the problem.
JSONPath Syntax Reference
Every expression starts at the root, written as $. A single dot, like $.store, selects a direct child, while a double dot, $..author, is a recursive descent that searches every level of nesting for a key called author. A wildcard, *, matches any node at that position, so $.store.books[*].title gets every book's title regardless of how many books there are. Array indices work like most languages, [0] is the first element and [-1] is the last, while a slice like [0:3] selects a range of indices. Filter expressions use [?( )] with @ standing for the node currently being tested, so $.store.books[?(@.price<40)] matches only the books priced under 40.
Common JSONPath Mistakes
The most common mistake is forgetting the leading $, every valid expression needs it as the starting point. A close second is using a single . where a deep, recursive search was intended, . only looks at direct children, while .. searches every level below. Inside filter expressions, forgetting the @ is a frequent error too, @.price refers to the current node's price field, and omitting the @ produces an invalid expression rather than a working filter. Finally, array indices are 0-based, so [1] is the second element, not the first, a common source of off-by-one confusion.
A Free JSONPath Query Tool
This jsonpath online tool doubles as a jsonpath evaluator, a jsonpath query tool, and a json path finder, all jsonpath online free with no signup. Use it as a jsonpath filter tester before dropping an expression into code, or simply as a general json query tool for exploring an unfamiliar payload.