CSS Minifier
Minify CSS
What Is This Tool?
The CSS Minifier removes comments and unnecessary whitespace from a stylesheet to reduce its file size, without changing what the CSS does. It's a dedicated, single-purpose page for that one job. Everything runs locally in your browser.
How to Use
Paste your CSS into the input box.
Click Minify.
See the size reduction percentage.
Copy the result or download it as a .css file.
Features
- Removes comments
- Collapses all unnecessary whitespace
- Shows before/after size reduction
- Copy to clipboard or download as a file
- 100% client-side — nothing leaves your browser
Examples
Before:
.card {
color: #333;
padding: 10px;
}
After (minified):
.card{color:#333;padding:10px}
Common Use Cases
- Shrinking stylesheets before deploying to production
- Reducing page weight for faster load times
- Preparing compact CSS for embedding inline
- Comparing minified size before and after edits
Frequently Asked Questions
Is my CSS uploaded anywhere?
No. Minifying happens entirely in your browser using JavaScript. Nothing is sent to a server.
Is this a full CSS parser?
No. It's a best-effort, regex-based minifier. It handles standard stylesheets well but can be confused by braces inside string values or url() that contain literal braces - a known, documented limitation.
Does it change my selectors or property values?
No, only comments and whitespace are removed. Selectors, property names and values are preserved exactly.
How much smaller will my CSS get?
It depends on how much whitespace and how many comments your original stylesheet has. The tool shows the exact percentage reduction after each run.
Should I use this instead of a build-tool minifier?
For quick one-off shrinking it's fine, but a build pipeline using a dedicated CSS minifier can apply more advanced optimizations like merging duplicate rules.
Can I download the result?
Yes, click Download to save the current output as a data.css file.