HTML Minifier
Minify HTML by removing comments, collapsing whitespace and trimming attributes. See the exact bytes saved.
About HTML Minifier
Minification strips everything a browser does not need — comments, indentation, line breaks between tags — without changing how the page renders. On a large template this routinely cuts 20 to 40 percent of the transferred bytes, which shows up directly in your Largest Contentful Paint.
How to use it
- Paste your HTML.
- Choose which optimisations to apply.
- Minify, then check the savings summary.
- Copy or download the compressed output.
Frequently asked questions
Is minified HTML safe to deploy?
Yes, with one caveat: whitespace inside <pre>, <textarea> and <code> is significant and is preserved here. Everything else collapses safely.
How much will I actually save?
Typically 20 to 40 percent before gzip. After gzip the gain is smaller, since compression already handles repeated whitespace well, but it is still worth doing.
Should I minify by hand?
No. Keep your source readable and minify as a build step. Use this tool for one-off snippets, email templates and pasted markup.
Trending guides
In-depth reads that go beyond the calculator.
- Trending6 min read
SIP Calculator guide
A Systematic Investment Plan is a standing instruction to put a fixed amount into a mutual fund on the same date each month. That is the whole idea. It is not a product you buy, not an asset class, and not a scheme with a guaranteed rate — it is a schedule. The returns come from whatever the underlying fund holds.
- 3 min read
BMI Calculator guide
Body Mass Index is weight in kilograms divided by height in metres squared. That is the whole calculation. It was devised in the 1830s by the Belgian statistician Adolphe Quetelet, who was explicitly describing populations rather than assessing individuals — a distinction that matters enormously and gets lost constantly.
- 3 min read
Percentage Calculator guide
Almost every percentage problem is one of four shapes. Knowing which one you are looking at is most of the work, because each has a different formula and mixing them up is where the wrong answers come from.