Turn minified or messy HTML into clean, indented code. Paste your markup and get readable output instantly, with pre, script and style content left untouched.
The formatter tokenizes your markup into tags and text, then tracks nesting depth to indent each line. Void elements like img and br never increase depth, and the contents of pre, script, style and textarea blocks are preserved verbatim so code samples and whitespace-sensitive text survive intact.
This is a lightweight beautifier, not a validator: it will not fix mismatched tags or quote attribute values for you. Severely broken markup may indent oddly, which itself is a useful signal that something needs fixing. Choose 2 spaces, 4 spaces or tabs to match your project style.