HTML Minifier

Minify HTML code to reduce file size for faster page loads.

Compress HTML

Input HTML
Minified Output

About This Tool

HTML minification removes comments and collapses whitespace to reduce file size. This minifier is content-safe: the contents of pre, textarea, script, and style tags pass through untouched, and conditional comments are preserved. Smaller HTML files load faster and improve page performance.

Your data never leaves your browser • No cookies • Works offline after your first visit

Press ? for keyboard shortcuts

We use minimal, privacy-focused cookies to improve your experience. Our developer tools process all data locally — we never store your content. Learn more