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, choose your indent size and whether to use tabs or spaces, and the formatted result updates as you type. Copy it with one click, 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.
Tabs or spaces?
Your choice — pick spaces with an indent width (2 or 4 are common) or a single tab per level. The setting applies live.
How do I minify instead?
Use the HTML minifier, which strips whitespace and comments to shrink the file. The two tools are cross-linked.