This tool strips HTML comments and collapses whitespace between tags to reduce page weight, while leaving the
contents of <pre>, <textarea>, <script>, and
<style> blocks untouched, since whitespace inside those is often meaningful.
<!-- ... --> HTML comments.<pre>, <textarea>, <script>, and <style> is left exactly as written.HTML minification rarely saves as much as JS or CSS minification, but on a text-heavy page with lots of nested markup and indentation, the savings add up — and every byte counts for a page's Largest Contentful Paint on a slow connection.
Whitespace inside <pre> and <textarea> is part of the displayed content,
so collapsing it would visibly change the page. Script and style blocks are skipped too, since collapsing
whitespace inside CSS or JS is a different problem — use the dedicated JS Minifier
for embedded scripts.
Need readable HTML back? Use the HTML Formatter.
100% client-side — your markup is never uploaded.