JSONPath / JMESPath Query Tester Tool - Real-Time JSON Query Evaluator for AWS CLI --query
First Published:
Last Updated:
aws cli --query expressions and jq-style filters against any JSON. Switch between query languages, load AWS-style examples, and inspect results without sending data anywhere.All processing is performed entirely in your browser using client-side JavaScript. No data is transmitted to any server. Your JSON never leaves your device.
⚠️ IMPORTANT DISCLAIMER:
- This tool is provided "AS IS" without any warranties of any kind.
- The author accepts no responsibility for incorrect query results or any other issues arising from the use of this tool.
- Do not paste sensitive or confidential data without understanding that all processing is local.
- Always keep backups of your original data.
- By using this tool, you accept full responsibility for any outcomes.
This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.
Result:
Features
- Two query languages, one UI: Switch between JMESPath (the language behind
aws cli --query) and JSONPath (Goessner-style$..book[?(@.price < 10)]) without leaving the page. - Real-time evaluation (200ms debounce): Edit either pane and see the result update automatically — no submit button required.
- AWS-flavored examples: Preloaded JMESPath snippets mirror common
describe-instancesanddescribe-volumespatterns, so you can prototype CLI--queryflags safely offline. - Inline error explanations: JSON parse errors show line/column. Query errors surface the parser message verbatim (e.g.
SyntaxError: Unknown character: ?). - Recent JSON history (last 5): The most recent JSON inputs are stored in
localStorageon this device only and can be reloaded with one click. - One-click JSON formatter: Re-stringify JSON with 2/4-space, tab, or minified output.
- Result copy with fallback: Uses the modern Clipboard API where available and falls back to
document.execCommand('copy')for older browsers. - Keyboard shortcut: Ctrl/Cmd+Enter in either input forces an immediate re-evaluation.
- Mobile friendly: Two-pane layout collapses to a single column below 768px.
- 100% offline-capable: Once loaded, both query libraries are self-hosted and the page keeps working without an internet connection.
How to Use
- Pick a query language by clicking the JMESPath or JSONPath tab.
- Paste your JSON into the JSON Input textarea, or load a built-in example from the dropdown.
- Type your query expression. The result pane updates automatically.
- Adjust the output indent (2/4 spaces, tab, or minified) to match your downstream tool.
- Use Format JSON to pretty-print the input, Copy Result to grab the output, and Clear All to reset.
- To re-use a previous JSON payload, pick it from Recent JSON inputs.
JMESPath vs JSONPath at a glance
- JMESPath is the query language used by the AWS CLI's
--queryflag, AWS SDKs (Boto3 paginators, waiters), Ansible, Azure CLI, and others. Strengths: pipes, multi-select hashes/lists, projections, and built-in functions likesort_by,length,map,max_by. - JSONPath (Goessner-style, as implemented by
jsonpath-plus) is closer to XPath. Strengths: recursive descent ($..), array slicing ([start:end:step]), and inline JS-like filter predicates (?(@.price < 10)). - Use this tool to confirm a query produces the same shape your CLI / SDK will receive before pasting it into a script.
Important Notes
- This tool implements JMESPath via the reference jmespath library used by the AWS CLI; the grammar should match exactly. JSONPath is implemented via jsonpath-plus, which uses a safe (no
eval) expression evaluator in the browser. - Filter expressions in JMESPath need backticks for literals:
users[?age > `30`], notusers[?age > 30]. - JSONPath result is always an array of matches — even when only one element matches.
- Recent-history entries are kept in this browser's
localStorageonly; clearing site data or browsing in private mode removes them. - This tool does not parse newline-delimited JSON (JSON Lines) — paste a single JSON document.
- For very large JSON (multi-MB), evaluation may briefly block the UI thread; consider trimming the input before running expensive queries.
Third-Party Libraries:
- jmespath (v0.16.0) - License: Apache-2.0 (James Saryerwinnie) - https://github.com/jmespath/jmespath.js
- jsonpath-plus (library version: see file header for SRI) - License: MIT (Stefan Goessner / Brett Zamir) - https://github.com/JSONPath-Plus/JSONPath
References:
Tech Blog with curated related content
Web Tools Collection
Written by Hidekazu Konishi