CSS Minifier
Paste your CSS to get a smaller version with comments, spaces and line breaks removed. The tool shows how many bytes were saved.
Use the tool
Loading the tool…
About CSS Minifier
Paste CSS and get back a smaller version with spaces and comments removed. A smaller file loads faster on a web page. Tick the option to keep comments that start with /*!, which often hold licence notices.
Worked example
Paste a stylesheet with comments. The tool shows how much smaller the output is, and the minified CSS to copy.
Limits
Minifying does not check that your CSS is correct. Keep an unminified copy for editing, and test the minified file on your site.
How to use CSS Minifier
- Paste your CSS.
- Choose whether to keep comments that start with /*! (usually licences).
- Copy the minified CSS and check it in your project.
Good to know
- Only comments and spaces are removed. Numbers, colours, units and selectors are not rewritten, so the styles stay as they were and the saving is smaller than with advanced minifiers.
- Quoted strings and unquoted url() values are copied untouched.
- An unclosed comment, string or url( is reported rather than guessed.
- Always keep your original file and test the result.
Frequently asked questions
Will it break my CSS?
It should not, because it only removes comments and spaces that CSS ignores. Still, test the result before using it.
Why is the saving small?
It does not shorten colours or numbers. It only removes spaces and comments.
Is anything I type saved or sent?
No. The work happens in your browser on this page, and nothing is stored or sent to us.