Skip to main content

CSS Minifier

Minify CSS and merge duplicate rules, keep license comments and see the size saved including gzip. Private, in your browser.

CSS

Stays in your browser

Result

The result appears here.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to CSS Beautifier or HTML Minifier.

Free Online CSS Minifier

Shrink a stylesheet for production. Paste CSS, press Minify and see how many bytes you saved. It gives developers a quick browser-based way to solve a focused css minifier task before moving the result into a project.

How to use the css minifier

Paste your code in the box, adjust the options if you want, and press Minify. Whitespace and comments are removed, values are shortened and, with restructuring on, rules that share declarations are merged. Comments that start with /*! are kept so licenses survive.

Common mistakes

  • Keep the original file: minified code is not meant to be edited or read.
  • Test the result before you ship it, especially if the code relies on function names or comments.
  • An unclosed brace stops the minifier and shows the line where the block started.

Frequently asked questions

What does restructuring do?
It merges rules with the same declarations and removes declarations that are overridden. It never changes how the page looks, but turn it off if you need rules kept in their original order.
Which comments are kept?
Comments that begin with /*! are kept, which is the usual way to mark a license. Turn the option off to remove them too.
Is my CSS uploaded?
No. It runs in your browser.
How do I use this css minifier tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.

More Formatters & Parsers

View all Formatters & Parsers tools →