JSON Formatter
Paste messy JSON, get it pretty-printed or minified, with clear errors.
Formatted output appears here.
About this tool
Paste any JSON and get it pretty-printed with two-space indentation, or minified to a single line for payloads and config values. Invalid input shows the parser's actual error message so you can find the broken character fast. Since parsing happens in your browser, API responses and config files containing secrets never leave your machine.
Frequently asked questions
Is it safe to paste API responses with tokens in them?
Yes. The formatter runs JSON.parse locally in your browser. Nothing you paste is transmitted or logged anywhere.
Why does my JSON fail with 'Unexpected token'?
The most common causes are trailing commas, single quotes instead of double quotes, and unquoted keys. JSON is stricter than JavaScript object syntax.
When should I minify instead of format?
Minify when the JSON ships over the network or gets stored in a size-sensitive field. Format when a human needs to read or debug it.