Free · runs in your browser · no upload · no quota
CSS Minifier & Beautifier
Paste CSS to minify it — whitespace and comments removed, colours and values shortened, duplicate rules merged — or beautify minified CSS back into readable, indented rules. It runs csso, a structural CSS optimiser, right in your browser.
Good to know
License comments are kept.
Comments that start with /*! are kept by default, as licenses ask; untick the option to remove them.
Order still matters.
Merging never changes which rule wins for an element: csso only joins rules when the cascade stays the same.
Keep the source.
Minify a copy for production and keep your readable file for editing.
How to Minify or Beautify CSS
- Add your stylesheet
Paste CSS into the left box, drop a .css file onto it or click Open file. - Choose Minify or Beautify
Minify makes the smallest stylesheet with the same result; Merge rules also combines rules that repeat. Beautify puts every rule and property on its own line. - Copy or download
The result appears on the right with the size before and after. Copy it, or download it as a .css file.
Example
.button { color: #ff0000; margin: 0px; }
.link { color: #ff0000; margin: 0px; }.button,.link{color:red;margin:0}Frequently Asked Questions
-
What does minifying CSS do?It removes spaces, line breaks and comments, shortens values (
#ff0000becomesred,0pxbecomes0) and, with Merge rules, joins rules that set the same properties. Stylesheets typically shrink by 20–50% and the page looks exactly the same. -
Can I unminify CSS?Yes, choose Beautify: each rule and property goes on its own line with indentation. Comments removed by minifying cannot come back.
-
What does Merge rules change?It combines selectors with identical declarations and removes properties that a later rule overrides, the way csso does by default. The result renders the same; turn it off if you want the rules to stay where you wrote them, for example to compare files line by line.
-
Does it support modern CSS?Yes: custom properties (variables), media and container queries, @supports, @layer, grid and the other current features are kept as they are. Sass, Less and other preprocessors are not CSS; compile them first.
-
Is my CSS uploaded?No. It is processed in your browser and never leaves your device.