CSS Minifier
Shrink CSS by removing comments and whitespace, safely.
How to use the CSS Minifier
- Paste your CSS on the left.
- It is compressed, without touching strings or url() values.
- Copy the smaller CSS.
About the CSS Minifier
The CSS Minifier reduces stylesheet size by removing comments and unnecessary whitespace, so your pages load with less to download. Paste your CSS on the left and the compact version appears on the right, ready to drop into production.
It minifies safely by leaving the parts of your CSS where characters actually matter untouched. The contents of string values and url() references are preserved exactly, so file paths, data URIs, font names and quoted content are never mangled by whitespace removal. The result is a smaller stylesheet that still renders identically, without the subtle bugs that careless compression can introduce.
Minification runs entirely in your browser, so nothing you paste is uploaded. When you need to read or edit a compressed stylesheet again, the CSS Beautifier restores clean indentation, and to compress the rest of your front end use the HTML Minifier and JavaScript Minifier.
Frequently asked questions
What does the CSS minifier strip out?
It removes comments and collapses the whitespace between rules and declarations. The selectors, properties and values are kept, so the stylesheet is smaller but produces the same visual result.
Does it touch string values or url() contents?
No. Strings and the contents of url() references are left exactly as written, so file paths, data URIs and quoted values are never broken by whitespace removal.
Will minifying change how my site looks?
It should not. Only insignificant whitespace and comments are removed, and the parts of the CSS where spacing matters are preserved, so the rendered page stays the same.
Can I reverse the minification?
Removed comments cannot be recovered, but the CSS Beautifier can re-indent the compressed stylesheet into readable rules whenever you need to inspect or edit it again.
Is my stylesheet uploaded?
No. All processing happens in your browser and nothing is sent to a server, so it is safe to minify private or unreleased CSS.

