Remove comments and whitespace from HTML and CSS to make pages lighter.
🔒 Your code stays in your browser.
How to use the html & css minifier
- Choose HTML or CSS.
- Paste your code.
- Click Minify and copy the result.
Safe minification
Content inside pre, textarea and script tags is left untouched so it keeps working. Inline style blocks are minified as CSS.
Frequently asked questions
Will minifying break my site?
Basic whitespace and comment removal is safe for valid HTML/CSS. Keep the original for editing.
Does it minify JavaScript?
No – use a build tool like esbuild or Terser for JS.
How much smaller?
Typically 10-30%.