HTML Minifier
Minify HTML code to reduce file size
Original HTML
Settings
What is HTML Minifier?
An HTML minifier removes unnecessary whitespace, comments, optional tags, and redundant attributes from HTML code. This reduces file size and improves page load time, which directly impacts Core Web Vitals scores and search rankings.
How to use
- Step 1 — Paste your HTML source code into the input area.
- Step 2 — Configure options: collapse whitespace, remove comments, remove optional tags, minify inline CSS/JS.
- Step 3 — Copy the minified HTML or download it as a file. Check the size reduction percentage.
Result
Your 48 KB homepage HTML drops to 31 KB after minification — a 35% reduction that shaves 50ms off load time on 3G connections.
Related Tools
Webpage to PDF
Capture a webpage as a PDF
Privacy Policy Generator
Generate a privacy policy for your site
Terms of Service Generator
Generate a terms of service document
Cookie Consent Generator
Generate cookie consent banner code
CSS Minifier
Minify CSS code to reduce file size
JS Minifier
Minify JavaScript code to reduce file size