HTML Minifier
Reduce HTML size by removing comments and unnecessary whitespace. Your code is processed as text in your browser — it is never executed or uploaded.
Loading tool…
Need help with this tool or found a problem? WhatsApp support Email
What does the HTML Minifier do?
The minifier removes HTML comments (keeping conditional comments and <!--! … --> license comments unless you choose otherwise), collapses runs of whitespace to a single space and can minify inline <style> blocks.
The optional “remove whitespace between tags” setting gives smaller output but can join words that were separated only by a line break between inline elements, so check the result.
How to use the HTML Minifier
- Paste your HTML.
- Choose options.
- Copy or download the minified HTML and note the size saving.
Examples
Template clean-up
Removing developer comments and indentation from a landing page often saves 10–25% before gzip.
Common use cases
- Optimising static pages
- Email templates
- Reducing inline HTML in apps
Features and benefits
- Private by design — your data is processed on your device and never uploaded.
- Free with no account, no watermark and no usage limits.
- Works on phones, tablets and desktops in any modern browser.
Limitations to know
- Inline JavaScript is trimmed but not minified — use the JavaScript Minifier for scripts.
Frequently asked questions
Is minified HTML bad for SEO?
No. Search engines read minified HTML normally.
Will it break my page?
The default settings are safe. The aggressive whitespace option can join inline words; review it.
Is my HTML uploaded?
No.
Related tools
All developer toolsHTML Formatter
Indent and beautify HTML markup.
CSS Minifier
Minify CSS to reduce stylesheet size.
JavaScript Minifier
Remove comments and whitespace from JavaScript safely.
JSON Minifier
Minify JSON by removing whitespace.
HTML Entity Encoder
Escape special characters as HTML entities.
HTML Entity Decoder
Decode HTML entities back into readable characters.