HTML / CSS / JS minifier. Safe transforms only.
Strip comments, collapse whitespace and shorten hex colors across HTML, CSS and JavaScript, with a live before/after size readout. Everything runs in your browser; nothing is uploaded.
A free online tool by Digital HeroesYour code never leaves your browser. Nothing is uploaded.
Everything a minifier should do.
[if IE] comments and pre/textarea/script blocks stay intact./*! licenses), strip last semicolons and shorten six-digit hex colors to three where it's lossless..html, .css or .js file (up to 10 MB), the language is detected automatically.Four steps, no build tool.
- Paste your code into the Input box, or drop a
.html,.cssor.jsfile onto the Load file pill, the language is detected as you paste. - Pick the language if auto-detect guessed wrong, using the HTML / CSS / JavaScript toggle.
- Tune the checkboxes to choose which transforms run, strip comments, collapse whitespace, shorten hex, keep licenses, and so on.
- Copy or download the minified output and check the live size-savings readout to see how much you trimmed.
Frequently asked questions.
Is the minifier free and private?
Will minifying my JavaScript break it?
Does it strip license comments and conditional HTML?
/*! license comments are retained, and HTML conditional comments like <!--[if IE]> are left in place. Contents of pre, textarea, script and style blocks are never touched.How does auto-detect know the language?
@media/@import rule or selector-with-declarations block reads as CSS, and anything else falls back to JavaScript. When you load a file, the file extension wins. If it ever guesses wrong, just switch the language toggle.Does it work offline?
Published · Last updated .