HTML Formatter
Auto-indent and organize HTML markup for better readability.
Format, validate, and beautify JSON for easier reading and debugging.
Uses the browser's native JSON API to format and minify, with optional key sorting and custom indentation. Everything runs locally.
Format, minify and key sorting share one input: switching the indent or the sort toggle re-runs instantly, with no re-pasting.
Formatting offers 2-space, 4-space and tab indentation while keeping the original object and array nesting.
Key sorting recurses through nested objects, but only objects are sorted — array order stays exactly as you wrote it.
Invalid JSON reports the parser error position instead of emitting a half-formatted result.
A byte counter under the panes shows input and output size, so the saving from minifying is visible immediately.
Paste your JSON
Drop it into the left pane. The tool works on text only and never reads local files; invalid JSON reports the failing position.
Choose format or minify
Switch at the top. Minify removes whitespace only and leaves every key and value untouched.
Set indentation and sorting
Pick 2 spaces, 4 spaces or tabs; turn on key sorting when two similarly shaped payloads need to line up.
Copy the result
The copy button sits above the output, and the byte counter below shows what minifying saved.
Yes. Formatting and minifying recurse to any depth, and key sorting recurses too — but it only sorts objects, so array order is preserved.
There is no server limit because nothing is uploaded; the ceiling is your tab memory. Tens of megabytes usually work, but the tab runs out before the parser does, so split very large payloads.
Values stay the same, but the output is re-serialized: comments were never valid JSON, duplicate keys keep the last value, and integers above 2^53 lose precision under JavaScript number rules.
No. Parsing and formatting run in the browser and the text never reaches a server.
Auto-indent and organize HTML markup for better readability.
Minify HTML by removing extra spaces and non-essential characters.
Minify or prettify CSS code for production and maintenance workflows.
Beautify JavaScript code with consistent indentation and spacing.
Minify JavaScript to reduce file size for faster page delivery.
Compress JSON by removing unnecessary whitespace and line breaks.