CSS Minifier

CSS Minifier

Compress CSS by removing comments and extra whitespace for smaller, faster stylesheets

CSS Minifier Minify
Paste CSS on the left and it compresses automatically as you type.
CSS Input
Minified Output
Input: 0 B Output: 0 B
FAQ

Frequently Asked Questions

What does minifying CSS actually remove?

Comments, line breaks, indentation and spaces that the browser does not need, for example the space after a colon and the final semicolon in a block. Every selector, property and value survives unchanged, so the page renders identically.

How much smaller will my stylesheet get?

Typically 15 to 30% for hand-written CSS, and more if the file is heavily commented. The status bar under the editor shows the exact input size, output size and percentage saved for your own file.

Does minified CSS actually make a site faster?

It helps, mostly by reducing bytes over the wire and shortening the time the browser spends parsing the stylesheet. The gain is largest on slow mobile connections. Combined with gzip or brotli compression on the server, the saving is smaller but still real.

Can I get my original CSS back afterwards?

You can restore the formatting with the CSS Beautifier, which re-indents everything. Comments cannot be recovered, so always keep the commented source file and minify only the copy you deploy.

Is it safe with media queries and vendor prefixes?

Yes. Only whitespace and comments are removed, so at-rules such as @media and @supports, vendor prefixes like -webkit- and every value string are left exactly as written.

Is my CSS sent to a server?

No. Minification happens entirely in your browser, so nothing is uploaded, logged or stored. Pasting proprietary or client code is safe.