CalcBrew

CSS Minifier

Shrink a stylesheet before you paste it into a theme, an email or a CMS. Comments, indentation and redundant characters go; every rule and value stays exactly as it was. The byte count and percentage saved are shown next to the result.

0 B

🔒 Runs in your browser — nothing is uploaded. Formatting uses Prettier, loaded from the jsDelivr CDN on first use.

Share:

What gets removed

BeforeAfterWhy it is safe
/* header */ .a { color: red; }.a{color:red}comments, spaces and the last semicolon are ignored by browsers
margin: 0.5em 0 0.25emmargin:.5em 0 .25ema leading zero is optional in CSS numbers
color: #ffffffcolor:#fffdoubled hex digits are the same colour
a > b , c ~ da>b,c~dcombinators need no spaces

Undo it with the CSS formatter. Scripts: JavaScript minifier.

Frequently asked questions

Cite this calculator
APACalcBrew. (2026). CSS Minifier. https://calcbrew.com/css-minifier
MLA“CSS Minifier.” CalcBrew, 2026, calcbrew.com/css-minifier.

Link to https://calcbrew.com/css-minifier. Results are estimates; cite the underlying formula or data source for academic work.

Related tools

More in Developer Tools · All tools & games