JSONPath Query Tester
A tool that runs JSONPath expressions against JSON data and shows matching values and their paths in real time. It supports filter expressions (?()), wildcards, and recursive descent (..), making it easy to build and verify expressions that pull data from API responses. Everything runs in your browser.
How to use
- Type or paste data into "JSON", or load a file. You can also try it out with "Load sample".
- Enter an expression under "JSONPath" (e.g. $.store.book[*].author). Common examples can be inserted with the buttons.
- Matching values appear under "Results" as you type. Switch to "Paths" to list the paths of the matching elements.
- Use "Copy to clipboard" to copy the extracted values (as a JSON array) or the list of paths.
About this tool
JSONPath is a query language for extracting specific values from JSON, much like XPath for XML. "$" is the root, "." and "[]" select children, "*" selects all elements, ".." searches recursively at any depth, and "[?()]" filters elements that match a condition.
JSONPath is used in many places, including API testing tools, Kubernetes (kubectl -o jsonpath), and log platforms. Because this tool updates the results every time you type, you can build an expression while checking that it extracts exactly what you expect. It also shows the paths of matching elements, which is handy for finding where a value lives inside a JSON document.
Queries run on the open-source jsonpath-plus library (MIT license), and filter expressions are evaluated in a safe mode that can't execute arbitrary JavaScript. Your JSON is never sent to a server.
Frequently asked questions
What conditions can I use in filter expressions?
Use @ to refer to the current element, combined with comparison operators (== != < <= > >=) and logical operators (&& ||). For example: "$..book[?(@.price < 10 && @.category == 'fiction')]".
How do I get the last element of an array?
Use slice notation with a negative index, like "$.store.book[-1:]". A range such as "[0:2]" returns the first two elements.
Can filter expressions execute JavaScript?
No. Filter expressions are processed in a safe evaluation mode that doesn't allow arbitrary code execution such as function calls.
Is my JSON sent to a server?
No. Parsing the JSON and running the query both happen in your browser.