Shrink HTML instantly — strip comments, collapse whitespace
819 B · 36 lines
Minification Options
Results
Original
819 B
Minified
491 B
Saved
328 B
Reduction
40%
4 comments removed
The HTML Minifier removes unnecessary whitespace, blank lines, and HTML comments from your markup — reducing file size without changing how the page renders. Smaller HTML means faster page loads and lower bandwidth costs. Paste your HTML, choose your minification options, and copy the compressed output in seconds, right in your browser with no server uploads.
Minification strips out characters that are not needed for the browser to render the page — such as whitespace between tags, newlines, and comments. This reduces the file size, which speeds up page load times.
Yes for most cases. Regular HTML comments are ignored by browsers and safe to delete. This tool preserves IE conditional comments (<!--[if IE]>) since those affect rendering in legacy browsers.
No. This tool detects and preserves the contents of <script>, <style>, <pre>, and <textarea> tags exactly as written, so your JavaScript, CSS, and preformatted text are never touched.
Boolean attributes like disabled, checked, or required don't need a value — writing disabled is equivalent to disabled="disabled". Collapsing them saves a few bytes per attribute and is fully valid HTML5.