Paste HTML, drop a file, or
About this tool
An HTML formatter (or beautifier) takes minified or inconsistently-indented markup and rewrites it with clean, predictable indentation and line breaks, so it's easy to read, diff and edit. It doesn't change what the page renders — only the layout of the source.
Paste HTML, hit Format, and copy the clean markup with one click — search, undo and redo are built in. Or switch to the HTML minifier to go the other way. Everything runs locally in your browser.
Formatting happens locally — your markup never leaves your browser.
Frequently asked questions
Does formatting change how the page looks?
No. Beautifying only adds whitespace and line breaks to the source for readability; the parsed DOM and the rendered output are identical.
What indentation does the formatter use?
Two spaces per nesting level — a fixed, widely used convention that keeps output consistent and diffs small.
How do I minify instead?
Use the HTML minifier, which strips whitespace and comments to shrink the file. The two tools are cross-linked.