HTML Formatter
Reflow pasted or minified HTML onto indented lines: block tags one per line, void and inline tags respected, and <pre> blocks untouched.
Fill in the values and calculate
The form sends itself back to this page — results print below, computed on the server.
No results yet: fill the form above and press Calculate.
About HTML Formatter
Pasted, minified, or machine-generated HTML comes back as the same markup laid out one block tag per line, indented by nesting level. Runs collapse to single spaces between tags, and text keeps its words.
Void tags such as br, img, and meta never open a level, inline tags such as b and span stay on the line they belong to, and the content of a pre block is returned exactly as it was pasted. The formatter reflows; it does not rewrite or validate the markup.
Questions about HTML Formatter
Does it change what the page renders?
Only whitespace changes. Indentation and line breaks sit between block tags, where browsers already treat them as spacing.
Are inline tags moved to their own lines?
No. Tags like strong, span, or a link keep their text on the same line, because breaking those lines would change how the text lays out.
Is the HTML validated?
No. It reflows tokens without a parser checking nesting, so a stray closing tag just re-indents the lines after it.
Bookmark and homescreen
- Press Ctrl+B now (or Cmd+B on macOS) to bookmark this page in your browser.
- Drag this link to your bookmarks bar and it will always open this tool: HTML Formatter.
- On a phone: open in Chrome/Safari and use "Add to Home Screen" — the site ships a homescreen icon and manifest, so it installs like an app.
- Two addresses work:
https://useful-utilities.com/html-formatter/andhtml-formatter.useful-utilities.com. Copy whichever you prefer.