JSON Formatter
Reindent minified or malformed JSON into something readable.
Loading tool…
About this tool
Parses the document with the browser's own JSON parser, then re-serialises it at your chosen indentation. Because it round-trips through a real parse, anything that comes out the other side is guaranteed to be valid JSON.
Limitations
- Comments and trailing commas are not valid JSON and will be reported as errors.
- Key order is preserved except where duplicate keys exist — the last value wins, as in any JSON parser.
- Numbers larger than 2^53 lose precision because they pass through JavaScript numbers.
Questions
- Why does my JSON with comments fail?
- The JSON specification has no comment syntax. Formats that allow them (JSONC, JSON5) are supersets. Strip the comments first, or use a YAML tool, which does support them.
- Does formatting change my data?
- Only whitespace, unless you enable key sorting. Very large integers are the one exception: JavaScript numbers cannot represent every 64-bit integer exactly.
Privacy
This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.