API Response Formatter
Fetch any public API URL or paste raw JSON — format it with configurable indentation, sort keys, minify, and download. Shows key count, max nesting depth, and output size. Works entirely in your browser.
CORS note
Requests are made from your browser. The target API must allow cross-origin requests (CORS) to respond. All sample URLs above support CORS. If you get a network error, the API blocks browser requests — use curl or Postman for those.
Features
URL or Paste
Fetch from a live API URL or paste raw/minified JSON directly
Format options
Control indent size, key sorting, and minification
JSON stats
Key count, max nesting depth, and output size shown instantly
Download
Save the formatted JSON as a .json file with one click
Sort keys
Alphabetically sort all object keys for consistent, readable output
Browser-only
No server — your JSON and API URLs stay on your device
How to use
- 1
Choose mode
Select "Fetch URL" to load a live API or "Paste JSON" for raw data you already have.
- 2
Set options
Configure indent size, key sorting, or minification before formatting.
- 3
Format
Click Fetch & Format or Format JSON. Stats appear above the output.
- 4
Export
Click Copy to clipboard or Download to save as a .json file.
Frequently asked questions
Why would I use this instead of the JSON Formatter tool?
The JSON Formatter is focused on validating and debugging JSON syntax with error highlighting. This tool is focused on working with API responses — fetching live data, exploring stats, and downloading output. Use the JSON Formatter when debugging malformed JSON; use this tool when exploring API responses.
How do I get a minified API response into this tool?
Switch to Paste JSON mode, paste the minified string, set your indent to 2 or 4, and click Format JSON. The tool will expand it into readable, indented JSON.
What is the maximum JSON size this tool can handle?
There is no hard limit — it runs in your browser. In practice, JSON files up to a few megabytes format instantly. Very large files (10 MB+) may be slow depending on your device.
Can I format XML or CSV from an API?
No. This tool only handles JSON responses. If an API returns XML or CSV, the formatter will show an error. Use the Paste JSON mode only for valid JSON data.