Minify CSS
Compress and optimize CSS code by removing whitespace, comments, and unnecessary characters.
Before / after example
BEFORE
.card {
/* main card style */
padding: 16px;
border-radius: 8px;
color: #1f2937;
}AFTER
.card{padding:16px;border-radius:8px;color:#1f2937;}What this tool doesn't do
It only strips whitespace and comments. For deeper optimization, pair it with a build-tool plugin:
Merge duplicate selectors
Two separate .card { } blocks stay separate. A full optimizer like cssnano can combine them.
Shorten color values or shorthand properties
#1f2937 stays as-is; it won’t rewrite margin: 10px 10px 10px 10px to margin: 10px.
Remove unused CSS
This tool doesn’t know which selectors your HTML actually uses — pair it with a tool like PurgeCSS for that.
How it works
Paste CSS
Copy your CSS code into the input box.
Minify
Click "Minify CSS" to compress and optimize the code.
Copy Result
Copy the minified CSS to reduce file size.
Common use cases
Website Optimization
Reduce CSS file size to improve page load speed and performance.
Production Deployment
Minify CSS before deploying to production to save bandwidth.
CDN Optimization
Compress CSS files before uploading to CDN for faster delivery.
Mobile Performance
Reduce CSS size for better performance on mobile devices.
Frequently asked questions
Is my CSS code stored or sent to a server?
No. All CSS minification happens entirely in your browser using JavaScript. Your code never leaves your computer, ensuring complete privacy and security.
How much smaller will my CSS be?
Typically 20-40% smaller depending on formatting and comments. Files with many comments see larger reductions.
Does it change CSS functionality?
No, minification only removes whitespace and comments. Your CSS will work exactly the same.
Can I beautify minified CSS?
Yes, but you will need a CSS beautifier tool to add back formatting and indentation.
Does it optimize selectors?
This tool only removes whitespace. For advanced optimization like selector merging, use a CSS optimizer.
Can I use this tool offline?
Yes, once the page loads, the tool works completely offline since all processing happens in your browser.