HTML Minifier
Minify HTML by removing whitespace, comments, and redundant attributes. See exact byte savings. Free and instant — no upload required.
Frequently asked
questions
HTML minification removes unnecessary whitespace, newlines, and comments from HTML source code. The rendered page looks identical to users but the file size is smaller, resulting in faster page loads and reduced bandwidth.
For most HTML it is safe. The minifier preserves content inside <pre>, <script>, and <style> tags where whitespace is significant. Inline event handlers and attributes are not removed.
Typically 10–25% on average HTML pages. Pages with lots of indentation and comments can see 30%+ savings. Combined with GZIP compression (which most web servers already apply), the benefit of HTML minification is smaller but still worthwhile.