How to use
- Paste your CSS.
- Choose whether to restructure rules and keep license comments.
- Click Minify, or press Ctrl+Enter (⌘+Enter on Mac).
- Copy or download the minified CSS.
Options explained
- Merge and restructure rules
- Combines rules with the same selector or the same declarations when it is safe to do so. Turn off to only remove whitespace and shorten values.
- Keep license comments
- Keeps comments that start with /*!, which is the convention for license notices.
Examples
a { color: #ff0000; }
/* note */
a { margin: 0px; }
minifies to a{color:red;margin:0}.
Frequently asked questions
What gets shortened?
Colours (#ff0000 → red, #ffffff → #fff), zero units (0px → 0), redundant semicolons and quotes, and whitespace. With restructuring on, duplicate rules are merged.
Can restructuring change how my page looks?
CSSO only moves declarations when the cascade result stays the same. If you rely on unusual hacks, compare the result or turn restructuring off.
Is my code uploaded?
No. Minification runs in your browser.
Privacy
This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.