CSS Minifier
Compress CSS by stripping whitespace and comments.
CSS Minifier
Developer tool running locally in browser
What does CSS Minifier do?
Minify CSS by removing comments, collapsing whitespace, dropping the last semicolon in each block and shortening colour values where it is safe. The byte saving is reported before and after gzip.
How to Use CSS Minifier
- 1Paste your CSSFormatted source is fine.
- 2MinifySafe transformations are applied.
- 3Copy the resultAnd check the reported saving.
Key Features
- Comments and unnecessary whitespace removed
- Final semicolon in each block dropped
- Six-digit hex colours shortened to three where equivalent
- Zero units normalised (0px becomes 0)
- Original, minified and estimated gzip sizes shown
Frequently Asked Questions
How much smaller does CSS get?
Typically 20–35% before gzip on well-commented source, and around 10% after gzip. The gain is real but modest — removing unused CSS entirely matters far more.
Is minified CSS safe?
Yes, when only whitespace, comments and equivalent value forms are changed, which is all this tool does. It never reorders or merges rules, since those transformations can alter specificity outcomes.
Can I un-minify CSS?
Yes — run it through the CSS formatter. Comments cannot be recovered, but the structure and formatting come back.
Does minifying help my Core Web Vitals?
A little, by reducing the bytes of a render-blocking resource. Inlining critical CSS and removing unused rules generally move First Contentful Paint far more.
Input is processed in your browser and never transmitted. That said, treat any web page as untrusted for live production secrets — rotate anything you paste anywhere.
Related Tools
CSS Formatter
Beautify CSS with consistent indentation and spacing.
HTML Minifier
Compress HTML by removing safe whitespace and comments.
JSON Minifier
Strip whitespace from JSON to make it as small as possible.
JavaScript Formatter
Beautify JavaScript, TypeScript and JSX code.
