What is an HTML Formatter?
Markup that came out of a minifier, a CMS export or a browser view-source is often one enormous line. Reading the structure of it by eye is close to impossible.
Paste it here and get it back indented, one tag per line, with the nesting visible. Choose two or four space indentation.
Void elements such as img, br and input do not increase the indent, which is what makes the output match the real structure rather than drifting one level deeper with every self closing tag. The contents of pre, textarea, script and style are left exactly as they were, since reformatting those changes meaning.
Frequently asked questions
Does formatting change how the page renders?
Adding whitespace between block level tags does not. Adding it between inline elements can introduce a visible space, so format for reading and keep the minified version for shipping.
Does it fix broken HTML?
No. It indents what you give it. An unclosed tag will make the indentation drift, which is often a fast way to spot exactly where the markup went wrong.
Will my inline scripts be reformatted?
No. Script, style, pre and textarea contents are preserved exactly.
Is anything uploaded?
No, it runs in your browser.