JSON Formatter
Paste compact or messy JSON to pretty-print it with consistent indentation, check that it parses, or minify it back to one line.
Your input stays in your browser. Nothing is uploaded.
About this tool
The input is parsed with the browser's standard JSON parser and printed again with two-space indentation. Because the text is fully parsed, the output is normalised: extra whitespace disappears, and duplicate keys keep only their last value. Strict JSON rules apply, so comments, trailing commas, single-quoted strings, and unquoted keys are errors. Very large numbers lose precision beyond about 15–17 significant digits, because they are read as JavaScript numbers.
How to use it
- Paste JSON into the input panel.
- Choose Format to indent it, or Minify to remove whitespace.
- If the input is invalid, read the error message, fix the reported problem, and try again.
- Copy or download the result.
When to use it
- Reading minified API responses
- Reviewing config files before committing
- Spotting syntax errors in hand-written JSON
Examples
Compact API response
{"id":7,"tags":["a","b"]} becomes a 7-line object with each key and array item on its own line.
Trailing comma
{"a": 1,} fails with a parse error. Remove the comma after 1 and it formats normally.
Large IDs
{"id": 12345678901234567890} prints as 12345678901234567000, because the number exceeds JavaScript's safe integer range. Send such IDs as strings.

