About the JMESPath Tester
JMESPath is a query language for extracting and transforming data from JSON documents — used by tools like the AWS CLI (`--query`), Ansible, and many APIs as a way to filter and reshape JSON responses without writing custom code.
This tool lets you paste JSON data and a JMESPath expression, and see the query result immediately, making it easy to build and debug a query before using it in a script or CLI command.
How it works
- Paste your JSON data into the data box.
- Write a JMESPath expression in the query box (a sample expression is pre-filled to get you started).
- Click Run to see the query result rendered as formatted JSON, or an error if the expression is invalid.
Common use cases
- Filtering AWS CLI output: Building and testing a `--query` expression for the AWS CLI, like extracting only running EC2 instances' IDs, before running it against real infrastructure.
- Extracting nested fields from an API response: Writing a JMESPath expression to pull a specific nested value out of a large, deeply nested JSON API response.
- Filtering an array by condition: Testing an expression like `people[?age > \`36\`].name` to extract only the names of people matching a specific condition.
Frequently asked questions
What can JMESPath do that simple dot-notation can't?
JMESPath supports filtering arrays by condition (`[?age > \`30\`]`), projections across arrays, multi-select expressions to reshape output, functions like `length()` and `sort_by()`, and pipe expressions to chain operations — far more than simple `a.b.c` style field access.
Why do numeric literals in filters need backticks?
JMESPath uses backticks to denote JSON literals within an expression, so `age > \`30\`` treats 30 as a JSON number literal for comparison — without backticks, JMESPath would try to interpret it as a field reference instead.
Is JMESPath the same as JSONPath?
No — they're similar in purpose but have different syntax and capabilities. JMESPath (used by AWS tools) has its own specification with features like multi-select and pipe expressions that don't map directly onto JSONPath syntax.
Why did my query return null?
A JMESPath expression returns null when the path or filter doesn't match anything in the data — double-check field names for typos and confirm the JSON structure actually contains the nested path you're querying.
This tool runs entirely in your browser — nothing you enter is sent to a server. Read more in the Privacy Policy, or browse the full list of tools.