HTML Minifier
Why Minify HTML?
HTML comments, extra whitespace, and unnecessary gaps between tags add kilobytes to every page load. Minifying HTML strips all of this without changing the rendered output, resulting in faster time-to-first-byte and better Core Web Vitals scores.
Features
- Comment removal — strips all
<!-- … -->comments. - Whitespace collapse — reduces runs of spaces, tabs, and newlines to single spaces.
- Inter-tag cleanup — removes whitespace between closing and opening tags.
- Size comparison — see original vs minified byte count and savings percentage.
- Copy to clipboard — grab the minified HTML with one click.
Common Use Cases
- Optimising HTML email templates that have strict size limits.
- Reducing static HTML page size before deploying to a CDN.
- Preparing server-rendered HTML for embedding in API responses.
- Cleaning up generated HTML from WYSIWYG editors.