How to use
- Paste your JSON into the input box.
- Choose an indent width, or pick Minify to strip all whitespace.
- Valid JSON is formatted instantly; invalid JSON shows an error message below.
- Click Copy to grab the result.
About JSON formatting
JSON’s grammar is deliberately small, and that smallness is the source of most formatting errors people hit. The specification allows no trailing commas, no comments, no single-quoted strings, and requires every object key to be a quoted string. JavaScript object literals permit all of those, so code that looks correct in an editor often fails a strict parse.
Minifying matters more than it looks. Whitespace in a JSON payload is pure transfer cost, and on a high-traffic API removing it measurably reduces bandwidth. Formatting is the inverse operation, traded for human readability during debugging.
Key order is preserved in both directions, and strings, booleans and null round-trip
unchanged. Numbers are the exception: this tool follows JavaScript’s IEEE 754
double-precision arithmetic, so integers past Number.MAX_SAFE_INTEGER (2^53 − 1) can
lose precision on the way through. If you’re formatting data with 64-bit IDs — snowflake
IDs, database bigints — store and transmit them as strings rather than raw numbers to
avoid this.