ToolsHTML Minifier
HTML Minifier
Remove common HTML comments and compress safe whitespace while preserving raw-text content and important directives.
0 / 1,000,000 characters
Press Ctrl+Enter (or ⌘+Enter) to minify. Input stays in this browser.
0 characters
How it works
- Processing is local; no HTML is sent to a provider.
- Ordinary comments and safe whitespace are compressed; conditional, SSI, and license comments are kept.
- Script, style, textarea, and pre contents are preserved, including whitespace and comment-like text.
- Input is limited to 1,000,000 characters. The scanner does not repair or validate HTML.