Format minified or messy HTML with consistent indentation, making it readable again.
Google AdSense Banner
This area will contain advertisements after approval.
Google AdSense Banner
This area will contain advertisements after approval.
This tool tokenizes your HTML into tags and text using its own hand-written tokenizer, then re-indents based on tag nesting depth, two spaces per level. Void elements (like <br>, <img>, <input>, <meta>) don't affect indentation depth, since they never have closing tags. A single text-only child is kept on the same line as its parent tag for readability.
Unlike our XML Formatter, this tool doesn't throw an error on mismatched or unclosed tags. Real-world HTML5 permits optional closing tags for several elements (like <li>, <p>, and <td> in certain contexts), so a strict well-formedness check would produce false errors on perfectly valid HTML, this tool prioritizes producing a reasonable, readable result over strict validation.
No, this is a formatter, not a validator, it re-indents based on tag structure but doesn't check whether your HTML follows the full HTML5 specification.
No, all formatting happens entirely in your browser, your code is never transmitted anywhere.
Google AdSense Banner
This area will contain advertisements after approval.