HTML Minifier
Shrink your HTML by removing comments and the whitespace browsers ignore between tags.
HTML Minifier
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
About the HTML Minifier
HTML files are full of whitespace and comments that make the source readable but add weight the browser doesn't need. Minifying removes HTML comments and collapses the runs of spaces and line breaks between tags, trimming the download without changing how the page renders.
This minifier is careful with content where whitespace matters: the contents of <pre>, <textarea>, <script>, and <style> are preserved exactly, and conditional comments (<!--[if …]-->) are kept. It reports the bytes saved so you can gauge the benefit.
Everything runs in your browser. For a full site, running minification as part of your build gives the most consistent results, but this is perfect for quick one-off optimisation and inspecting how much a page can shrink.