About CSS Minifier
Smaller stylesheets reach the browser sooner. Paste your CSS and get a compact version back at once, with the original size, the new size and the percentage saved shown under the result.
The minifier understands CSS rather than just deleting spaces: strings, url() values and old browser hacks such as *zoom or _height stay exactly as they were, and /*! licence comments are kept unless you turn that off. Rule merging can be switched off when the order of your rules matters.
How it works
- Your CSS is parsed with Prettier’s PostCSS-based parser and printed again with its standard layout, at the indentation you choose.
- Values, strings, selectors and comments are kept; what changes is the spacing, the line breaks and small details of notation such as quotes and leading zeros.
- In Minify mode csso parses the stylesheet, drops whitespace and ordinary comments, shortens values where the result is identical, and can merge rules that share selectors or declarations.
- The work runs in a background worker, so a large stylesheet never freezes the page.
Questions
Can merging rules change how my page looks?
The minifier only merges or moves rules when it can tell the result is equivalent, but it cannot see your HTML. If a page relies on a subtle ordering between rules of equal specificity, turn off Merge rules: every rule then stays where it was, whitespace and comments are removed, and values are only shortened where they mean the same, such as #ffffff to #fff.
Why did it refuse my CSS?
If the parser meets something it cannot read, such as a stray closing brace, the tool stops and shows the line and column instead of silently dropping that part. Fix it there and the result appears.
Can I turn minified CSS back into readable CSS?
Yes. Switch the mode to Format and the same stylesheet is laid out with one declaration per line. Removed comments do not come back.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.