What is HTML Minify
HTML Minify is a free online compressor that collapses whitespace, removes comments and redundant attributes, and minifies embedded CSS so HTML text is smaller to store or send.
It uses a dedicated minifier (html-minifier-terser) rather than a simple pretty-print toggle. Embedded JavaScript minify is off. Always preview critical templates — especially email — after minifying.
How to use HTML Minify
- Step 1: Add HTML. Paste, Import, Sample, or Fetch URL.
- Step 2: Run Minify. Review the size change toast when shown.
- Step 3: Copy or download. Take the compacted HTML for your CMS, ESP, or static host.
HTML Minify Features
- Minify with collapse whitespace, remove comments, and CSS minify
- Sample, Import, Fetch URL, Copy, Download
- Size feedback after minify when available
Common use cases
- Shrink email HTML: Reduce payload size before uploading to an ESP (then re-preview).
- Compact static fragments: Store leaner HTML snippets in configs or templates.
- Strip comments for shipping: Remove development comments from a fragment you plan to publish.
Minifies HTML text:
- HTML input (paste, import, or Fetch URL)
- Minified HTML text output
Need readable indentation instead? Use HTML Formatter. Preview afterward in HTML Viewer.
FAQ
Is HTML Minify free?
Yes. Tools Viewer tools are free to use in the browser with no account required.
Do I need to create an account to use HTML Minify?
No. Open the tool and start working — signup is not required.
Is my content uploaded to your servers?
Pasted or imported content for HTML Minify is processed in your browser. Tools Viewer does not store it. Optional Fetch URL (when available) retrieves a public page through a short-lived request so you can edit the result locally.
Does it minify JavaScript inside the page?
Embedded JS minify is off in this tool. CSS minify is on. Always preview critical templates after minifying. For readable indentation, use
HTML Formatter.
What is HTML minification?
HTML minification removes comments and unnecessary whitespace (and may compress embedded CSS) so files transfer faster. It does not change the meaning of well-formed markup when done carefully.