In short
To minify HTML, paste your markup and copy the compressed version. Comments and whitespace between tags are removed, but the contents of <pre>, <textarea>, <script> and <style> are left exactly as they are, so formatting-sensitive content isn't broken.
How to use the HTML Minifier
- 1Paste or type your input in the left box (or click "Try an example").
- 2Adjust the options if needed. The result updates as you type.
- 3Copy the result or download it as a file.
Where it helps
Minified HTML is useful for email templates with size limits and for embedding snippets. For websites, gzip/Brotli compression already removes most of the benefit.
Frequently asked questions
Does it minify inline CSS and JS?
No. Use the CSS and JavaScript minifiers for those.
Are conditional comments kept?
Yes, <!--[if …]> comments used by Outlook email templates are preserved.
Is my data sent anywhere?
No. Everything runs in your browser. What you paste is never uploaded, logged or stored, so it's safe for code, tokens and private content.
Last updated

