JSON Formatter
Format and beautify minified JSON with proper indentation.
From one-line mess to readable structure
APIs return JSON minified — every space stripped, everything on one line. Paste it here and get properly indented, readable output instantly. If the JSON is invalid, you'll get the exact parse error instead, which makes this a validator too.
The errors this catches daily
Trailing commas — valid in JavaScript objects, fatal in JSON. Single quotes — JSON requires double quotes around both keys and strings. Unquoted keys — {name: "x"} is a JS object literal, not JSON. Comments — JSON has none; strip // and /* */ before parsing. Truncation — copied API responses often get cut off mid-object, which shows as "unexpected end of input".
Debugging workflow
When an API integration fails, format the raw response first. Half of "parsing bugs" turn out to be an HTML error page or a truncated body rather than the JSON you expected — formatting makes that obvious in one glance.
Privacy for API payloads
Formatting runs entirely in your browser, so it's safe to paste responses containing tokens or internal data — nothing is sent anywhere. Still, prefer redacting secrets out of habit before sharing formatted output with others.
Frequently asked questions
Is my JSON sent to a server?
No — parsing and formatting happen locally in your browser, so API responses with tokens or private data never leave your machine.
Why does my JavaScript object fail validation?
JSON is stricter than JS: keys must be double-quoted, strings must use double quotes, and trailing commas and comments are forbidden.
Can it handle large files?
Yes — multi-megabyte API dumps format fine since everything runs locally. Extremely large files are limited only by your browser's memory.
What indentation does it use?
Standard 2-space indentation, the convention used by most APIs, linters and style guides.