CSS Minifier
Strips comments and collapses whitespace. Spacing inside parentheses — like calc(100% - 10px) — is left untouched, since removing it there can silently break the calculation.
Test after minifying
This tool is conservative on purpose — it won't achieve quite the same byte count as a full build-pipeline minifier (like cssnano), but it also won't strip a space that changes what your CSS actually does. Still worth a visual check on your site after swapping in the minified file.
How to use the CSS Minifier: step by step
- Paste your CSS.
- The minified version appears instantly with the original and new sizes.
- Copy the minified CSS.
- Test your page after replacing the file.
A real example
A theme’s 48 KB stylesheet is full of comments and indentation. Minified, it shrinks noticeably, which helps the page start rendering sooner.
Tips for better results
- Spacing inside parentheses like
calc(100% - 10px)is kept, because removing it can break the calculation. - Keep your readable original for editing; minify only the copy you publish.
- Build tools like cssnano compress further; this tool is deliberately safe.
More questions
Will minifying break my site?
This minifier is conservative, but always test after replacing a file.
How much smaller will my CSS be?
Usually 10–30%, depending on how many comments and spaces it has.
Is my code uploaded?
No, it’s processed in your browser.
Frequently asked questions
Why does calc() need special care?
calc() requires spaces around + and −. Naive minifiers remove them and break the rule, and this one keeps them.
Does it rename classes or merge rules?
No. It only removes what is safe to remove, so the result behaves exactly like the original.
Should I minify CSS by hand?
For small sites it is a quick win. Larger projects usually do this automatically in their build step.