HTML Formatter & Minifier
Beautify or minify HTML — useful for emails, snippets, and copy-pasted markup.
About HTML Formatter & Minifier
HTML Formatter & Minifier switches HTML markup between a clean, indented form and a compact, minified one. Beautifying is for reading and editing — markup pasted from a minified page, an email template, or a CMS export becomes a properly indented tree you can work with. Minifying is for shipping — it strips the whitespace browsers ignore so the file downloads faster.
Paste your markup and pick a mode. Beautify turns a run-on line such as <ul><li>One</li><li>Two</li></ul> into nested, indented lines and also reformats CSS and JS inside <style> and <script> blocks. Minify does the reverse — collapsing indentation, removing the gaps between tags, and stripping HTML comments.
The tool reformats markup as text — it does not render, sanitize, or execute it, and it does not repair invalid HTML beyond re-indenting what is there. A partial snippet, rather than a full document, is formatted as given.
All processing is local to your browser. Markup containing draft copy, internal URLs, or template logic is never uploaded or stored.