CSS Minifier
Minify CSS by stripping comments and whitespace to shrink your stylesheet.
Shrink your stylesheets for production
The CSS Minifier compresses a stylesheet by stripping out comments, collapsing whitespace and removing the spaces around braces, colons and semicolons. The result is functionally identical CSS in far fewer bytes, which means smaller downloads and faster page loads. After minifying, the tool reports the original size, the minified size and exactly how many bytes and what percentage you saved.
How it works
Paste your CSS and it is minified live in your browser through a safe, dependency-free pipeline written in JavaScript. Nothing is uploaded — the stylesheet is processed locally on your machine — so your styles stay private. The compressed CSS appears next to your input, ready to copy or download as a .min.css file.
Where it helps
- Trim production stylesheets to cut download size and improve load times.
- Quickly compress a small CSS file without wiring up a full build step.
- Compare before-and-after sizes to see how much a stylesheet can shrink.
- Produce a compact snippet to inline into a page or an email template.
It pairs naturally with the other optimization tools. Compress scripts with the JavaScript Minifier and markup with the HTML Minifier. When you need to edit a minified file again, expand it first with the CSS Beautifier.
The CSS Minifier is free, needs no account and runs in every modern browser, including mobile. Because all processing is client-side, your stylesheets never leave the page and stay private on your device.
Frequently asked questions
No. The tool uses a safe pipeline that only removes comments and unnecessary whitespace and tidies spacing around structural characters. The rules and values are unchanged, so the styles render the same.
Related tools
SQL Formatter
Format and beautify SQL queries across MySQL, Postgres and more dialects.
XML Formatter
Pretty-print and indent XML, or collapse it back into one line.
HTML Beautifier
Format and indent messy HTML into clean, readable markup.
CSS Beautifier
Beautify and indent CSS with consistent spacing and formatting.