JMESPath Tester
Run JMESPath queries against your JSON and see the result as you type. JMESPath is the query language built into the AWS CLI (--query), boto3, and many other tools, so this is the fastest way to prototype a filter before pasting it into a script. Paste your JSON on the left, write an expression on the right, and the extracted value appears live. Everything runs locally — your data never leaves the page.
How to use the JMESPath Tester
Paste any JSON document into the input box and type a JMESPath expression in the field at the top. The result updates on every keystroke, so you can build a query piece by piece and watch it narrow down. The output is pretty-printed JSON — a string, number, object, array, or null when the path matches nothing.
The default example shows a filter projection ([?state=='WA']), a sub-expression (.name), and a pipe into the sort function. Swap in your own data to test slices like users[0:5], multiselect hashes like {id: id, label: name}, or functions such as length(@), max_by(@, &score), and keys(@). The exact same expression works in the AWS CLI's --query flag.
What is JMESPath
JMESPath is a query language for JSON, designed to extract and transform elements from a document with a compact expression. It is the engine behind the AWS CLI's --query option and the boto3 paginator filters, and has well-maintained implementations in Python, JavaScript, Go, Ruby, PHP, and several other languages, so an expression you test here behaves identically across all of them.
A basic expression is a chain of identifiers separated by dots — a.b.c reaches into nested objects. Square brackets index arrays (items[0]), slice them (items[1:3]), or flatten them (items[]). A projection applies the rest of the expression to every element of a list: people[*].name collects the name of each person. Filter expressions like people[?age > `30`] keep only the elements matching a condition.
Beyond navigation, JMESPath has functions (length, sort, sort_by, max_by, join, to_string, contains, keys, values), pipes (|) that stop a projection and feed its result into a new expression, and multiselect constructs that build new objects ({name: name, total: sum(orders[].price)}) or arrays on the fly. That combination lets a single line reshape a response into exactly the structure a script needs.
Common use cases
- Prototyping AWS CLI queries. Build and verify a
--queryexpression against sample output before scripting it. - Reshaping API responses. Pull just the fields you need from a large JSON payload into a flat structure.
- Filtering arrays. Test filter expressions and projections without writing throwaway code.
- Learning the syntax. Experiment with functions, pipes, and multiselect hashes interactively.