Minify your HTML by stripping comments and collapsing unnecessary whitespace, while protecting script, style and pre content.
Google AdSense Banner
This area will contain advertisements after approval.
Google AdSense Banner
This area will contain advertisements after approval.
This tool strips HTML comments (except conditional comments), then collapses whitespace between and within tags down to a minimum. The contents of <script>, <style>, <pre> and <textarea> tags are protected from whitespace collapsing first, since removing newlines there could break JavaScript comments, CSS, or visibly alter preformatted text.
This is a regex/heuristic-based minifier, not a full HTML parser, so it won't rename attributes, remove optional quotes, or perform the more aggressive optimizations a build-tool-grade minifier would. It focuses on the safe, high-impact wins: comments and whitespace, which typically account for most of the reducible size in hand-written HTML.
No, content inside <script>, <style>, <pre> and <textarea> tags is left completely untouched, only whitespace outside those tags is collapsed.
No, all minification happens entirely in your browser, your code is never transmitted anywhere.
Google AdSense Banner
This area will contain advertisements after approval.