Guide
Testing JSONPath and JMESPath queries
When an API returns hundreds of lines of JSON and you need three values from it, a query language saves writing loops. JSONPath and JMESPath are the two most common: JSONPath appears in API testing tools, Kubernetes and many libraries, and JMESPath is built into the AWS and Azure command-line tools. This tester runs both against your JSON as you type, so you can build an expression step by step before putting it into code or a script.
JSONPath in brief
A JSONPath expression starts at $, the root. .name or ['name'] selects a child, [0] an array element, [-1:] the last element, [0:2] a slice and [*] every element. Two dots search at any depth: $..price finds every price in the document. Filters select items that match a condition, with @ standing for the current item: $.store.book[?(@.price < 10)]. JSONPath was standardised as RFC 9535 in 2024 after years of slightly different implementations.
JMESPath in brief
JMESPath expressions have no root symbol: store.book starts at the top. [*] projects over a list, [?price < \10`]filters it (literals in backticks, strings in single quotes), and|pipes the result into the next expression. Functions add real power:length(), sort_by(), max_by(), join(), contains()and more. Multiselect reshapes data:{title: title, isbn: isbn}` builds new objects with just those fields.
Which one to use
Use JSONPath when a tool expects it or when you only need to pick values out of a document. Use JMESPath when you need to transform the result: sort it, count it, rename fields or flatten nested lists. It is also the language you need for --query in the AWS CLI and Azure CLI.
Results and paths
The result appears as JSON in the right-hand panel, with the number of matches in its title. For JSONPath, the tester also lists the normalised path of every match, such as $['store']['book'][0]['title'], which shows exactly where each value came from — useful when a recursive search returns more than you expected.
Safe evaluation
Some JSONPath implementations evaluate filter expressions as JavaScript, which is a security risk with untrusted input. This tester uses jsonpath-plus in its safe mode, which interprets filters without executing code. Your JSON stays in the browser.
A worked example
On the sample bookstore, $.store.book[?(@.price < 10)].title returns “Sayings of the Century” and “Moby Dick”, the two books under 10. In JMESPath, max_by(store.book, &price).title returns “The Lord of the Rings”, the most expensive title, and length(store.book) returns 4.
Debugging an expression
Build it in steps: start with the first segment, check the result, then add the next. When a filter returns nothing, look at quoting and types first — comparing a string field to a number, or forgetting the backticks around a JMESPath literal, are the usual causes.
Using expressions in tests
API testing tools such as Postman, REST Assured, Karate and many assertion libraries accept JSONPath to pick a value from a response before comparing it. Building the expression here against a saved response is faster than rerunning a test suite for every attempt, and the matched paths show exactly which nodes an assertion will touch.
Related tools
Tidy and explore the input in the JSON Formatter, test text patterns in the Regex Tester, create types for the data with JSON to TypeScript, or query XML after converting it with the XML Formatter.
Checked against the current version of the JSONPath & JMESPath Tester on .

