JSONPath Query
Query JSON documents with JSONPath expressions and see every match.
Frequently asked questions
- What is JSONPath?
- A small query language for picking values out of a JSON document, like XPath for XML. $.store.book[0].title points at the first book title.
- Which JSONPath features are supported?
- Dot keys ($.store), bracket keys and indexes ($["a"], [0], negative indexes), wildcards (.*, [*]), recursive descent (..price), slices ([0:2]), unions ([0,2]) and filters such as [?(@.price < 20)].
- What does recursive descent (..) do?
- It searches for the given selector at every nesting level. $..price collects every "price" property anywhere in the document.
- Is my JSON sent anywhere?
- No. Everything runs locally in your browser.
- How do I filter items by a numeric field?
- Use a filter expression, for example $.store.book[?(@.price < 20)] returns the books cheaper than 20. Comparison operators, equality and boolean combinations work inside the brackets.
- What does the leading $ mean?
- The dollar sign stands for the root of the document. Every absolute expression starts there: $.name selects a top-level key, while $..name searches every nesting level. A bare key such as store.book is also accepted as shorthand.
- When should I use dot vs bracket notation?
- Use dots for simple key names ($.store.bicycle.color). Use brackets for keys that contain spaces or punctuation ($["first name"]), for array indexes ([0]) and for quoted keys. The two forms can be mixed freely in one expression.
About this tool
JSONPath is a compact query language for JSON, similar to XPath for XML. It lets you select nested values, walk every level with recursive descent, slice arrays and filter objects by their properties. This tool evaluates your expression locally and shows every match, so you can explore large API responses without writing code.
How to use it
- Paste or edit the JSON document in the editor.
- Enter a JSONPath expression such as $.store.book[0].title or $..price.
- Review the match count, the matched values and their types.
- Use the Tree tab to explore the result, or adjust the expression to narrow it down.
← All tools