Format a nested object
Input {"name":"Ada","limits":{"seats":5}}
Result Two-space output spreads the object over several lines, and the same data counts 3 keys at depth 2.
Paste JSON to pretty-print it, check it for syntax errors or strip every space, with byte counts before and after.
Result
Change any input and the result updates instantly.
Input {"name":"Ada","limits":{"seats":5}}
Result Two-space output spreads the object over several lines, and the same data counts 3 keys at depth 2.
Input A pretty-printed 4 KB config.
Result Minifying usually removes 20 to 40 percent of the bytes, depending on how deep the indentation was.
Input {"a":1,}
Result Validation fails with an error, because standard JSON does not allow a comma before the closing brace.
The usual causes are a trailing comma, single quotes instead of double quotes, an unquoted key, or a comment. Standard JSON allows none of these.
Yes. Minifying only removes whitespace between tokens, so parsers read exactly the same value. Keep the original if you need readable diffs.
No. Parsing, formatting and minifying all run in JavaScript on your device, so keys and any secrets inside stay local.
No. Formatting keeps insertion order, which is what JavaScript preserves for string keys. It does change whitespace, so the first diff looks large.
Disclaimer: Results follow the formula shown on this page and are for reference only. Real-world quantities vary with materials, technique and conditions, so allow a margin before ordering.