Developer tool
JSON Formatter
Pretty-print or minify JSON locally. Invalid JSON shows the parser error instead of a fake success message.
How to use JSON Formatter
- Paste JSON from an API, log or config file.
- Choose beautify or minify.
- Format the data, then copy or download the result.
Examples
Minified API payload
{"ok":true,"items":[1,2]} becomes an indented object you can read.
Broken JSON
A missing comma returns the native parser message, such as Unexpected token, instead of pretending it worked.
Privacy
API payloads never leave this page unless you copy them elsewhere.
FAQ
Does this validate JSON?
Formatting only succeeds if JSON.parse accepts the input. Use JSON Validator when you want a pass/fail message without rewriting the file.
Is comments-in-JSON supported?
No. Standard JSON does not allow comments.
Where is the data processed?
In the browser with JSON.parse and JSON.stringify.