CSS Minifier
Shrink CSS by removing comments, extra spaces and line breaks. Optionally keep licence comments.
Minified CSS
In short
What is the CSS Minifier?
The CSS minifier removes comments, line breaks and unnecessary spaces from a stylesheet so the file is smaller and loads faster. You can keep important licence comments that begin with a slash, asterisk and exclamation mark. It is a quick way to prepare a small stylesheet for production.
How to use it
- Paste your CSS into the box.
- Tick the option if you want to keep licence comments.
- Copy the minified CSS or download it as a file.
- Test the page to confirm styling looks the same.
Questions
CSS Minifier — FAQ
Is minified CSS safe to use?
Normally yes, as only whitespace and comments are removed. Always check your pages afterwards, especially if you use unusual selectors.
Does it rewrite colours or merge rules?
No. This is a simple minifier that only strips whitespace and comments, so the rules stay exactly as you wrote them.
Should I minify large projects by hand?
For big sites, use a build tool that minifies automatically. This page suits quick one-off jobs.
More Developer & Web tools
JSON Formatter & ValidatorJSON MinifierJSON to CSV ConverterCSV to JSON ConverterBase64 Encoder & DecoderURL Encoder & DecoderHTML Entity Encoder & DecoderUUID Generator
Go further