Getting your file…

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

  1. Add your stylesheet
    Paste CSS into the left box, drop a .css file onto it or click Open file.
  2. 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.
  3. 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

CSS
.button { color: #ff0000; margin: 0px; }
.link { color: #ff0000; margin: 0px; }
Result
.button,.link{color:red;margin:0}

Frequently Asked Questions

More browser tools