CSS Minifier
Minify CSS to shrink file size — strips comments and whitespace and collapses rules, running 100% in your browser with no upload.
/*! MyApp v1.0 | MIT License */ .btn{color:#ffffff;background:#0070f3;padding:8px 16px;border-radius:6px}141 → 105 bytes (26% smaller)
🔒 Minified in your browser — nothing is uploaded.
What this CSS minifier does
Paste a stylesheet and this tool returns a compact, production-ready version. It removes /* */ comments, collapses runs of spaces, tabs and newlines, and strips the unnecessary whitespace around braces, colons, semicolons and commas. It also drops the redundant last semicolon before every closing brace. The output updates live as you type and a size indicator shows exactly how many bytes you saved, so you can drop the result straight into your build or paste it inline.
Safe, predictable minification
Smaller CSS means fewer bytes over the wire and a faster first paint, especially on mobile connections. This minifier is deliberately conservative: text inside quoted strings and url() values is preserved untouched, descendant-combinator spaces (like .a .b) are kept because removing them would change the selector, and spaces inside calc() expressions such as calc(100% - 30px) are left intact so your math still works. The same input always produces the same output, with no server round-trip.
Frequently asked questions
Is my CSS uploaded to a server?
No. All minification happens locally in your browser with JavaScript. Your stylesheet is never sent, stored, or uploaded anywhere, so even unreleased or proprietary CSS stays private.
Will minifying change how my styles behave?
No. The tool only removes comments and unnecessary whitespace and the redundant final semicolon in each rule. It preserves string and url() contents, descendant-combinator spaces, and the spaces inside calc(), so the rendered result is identical.
How much smaller will my file get?
It depends on how many comments and how much indentation the original has. Heavily commented, nicely indented source often shrinks by 20 to 50 percent. The tool shows the exact before-and-after byte count and the percentage saved.