How CSS Minifier Works
The minifier removes comments and collapses whitespace around selectors and declarations, while leaving quoted strings untouched so values like content: " " keep their meaning.
How to Use This Tool
- Paste your CSS into the input box.
- Select Minify CSS.
- Copy the compact output and check the size reduction shown below it.
Example
Input:
.btn {
color: #fff;
background: #4f46e5;
}Minified output: .btn{color:#fff;background:#4f46e5}
Helpful Tips
- Keep an unminified copy of your stylesheet for editing — minified CSS is hard to read or debug later.
- Comments are always removed when minifying, since they add size without affecting how the page looks.
Frequently Asked Questions
Does minifying break my CSS?
No, only whitespace and comments are removed — every selector, property and value is preserved exactly.
How much smaller does CSS get?
It depends on how much whitespace and how many comments the original had — typically 10–30% smaller.
Is my CSS uploaded anywhere?
No, minifying happens entirely in your browser.
This tool runs entirely in your browser. Your input is not uploaded to any server.