Minify HTML by stripping comments, collapsing whitespace, and removing space between tags. Shows byte savings and compression ratio instantly. 100% browser-based.
The HTML Minifier instantly reduces HTML file size by removing all HTML comments (`<!-- ... -->`), collapsing all multi-character whitespace sequences to a single space, and eliminating whitespace between adjacent HTML tags — the three largest sources of bloat in hand-authored and template-generated HTML. The process is instantaneous and runs entirely in the browser, with no server round-trips. The compression ratio and exact byte savings are displayed after each run. A download button saves the minified output as a `.html` file.
QDoes this preserve inline JavaScript and CSS?
The HTML minifier strips HTML comments and collapses HTML-level whitespace. Inline `<script>` and `<style>` bodies are not parsed separately — their whitespace is collapsed along with the rest of the document. For deep inline script/style minification, run the content through the JavaScript Minifier or CSS Minifier first.
QWill minifying HTML break my page layout?
For most pages, no. However, pages that depend on whitespace-sensitive CSS (`white-space: pre`, inline-block gaps) may look different after whitespace collapsing. Preview the page after minification to confirm.
QIs my HTML sent to a server?
No. All minification is pure string processing that runs locally in your browser. Nothing is transmitted to any server.