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 browserResult
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.