HTML Minifier
Strip whitespace, comments, and redundant attributes from HTML. Preserves content inside <pre>, <textarea>, <script>, and <style>. 100% client-side.
// Minified HTML will appear here…
HTML Minifier
Shrink HTML output for faster page loads. Strips comments, collapses whitespace between tags, and normalizes redundant boolean attributes (disabled="disabled" → disabled). Content inside <pre>, <textarea>, <script>, and <style> is preserved so you don't accidentally break code samples or layout-sensitive text.
Common Use Cases
- Shrink static-site output before uploading to a CDN
- Pre-process email templates to fit within size limits
- Reduce transfer size for SSR Node.js responses
- Clean up WYSIWYG HTML before storing in a database
FAQ
Will this break my <pre> blocks?
No. Content inside preserved tags is restored verbatim after whitespace collapsing.
Is my HTML uploaded?
No. Minification is entirely client-side — safe for proprietary templates.
Related
Pretty-print instead with the HTML Formatter.
Preserves code
pre/textarea/script/style content is kept byte-for-byte.
Instant
Minification runs in milliseconds in your browser.
Fully private
Templates never leave your device.