CSS Minifier
Strip comments and extra whitespace from CSS while keeping quoted strings intact.
Quick answer: enter your details below and click Minify CSS — your result appears instantly, right here in your browser. Nothing you enter is uploaded or stored.
C
Developer
Enter your details below.
How to use
- Paste your CSS into the box.
- Click Minify CSS.
- Copy the compact result for use in a stylesheet.
About this tool
This tool removes CSS comments and collapses unnecessary whitespace, and it trims spaces around braces, colons, semicolons and commas. Quoted strings are protected first, so a URL or font name containing spaces is not broken by the stripping. It is a basic minifier: it does not rewrite selectors, merge rules or shorten colours, and very unusual CSS may need a full build tool instead.
Frequently asked questions
Will it break strings with spaces?
No. Quoted strings are set aside before whitespace is stripped and restored afterwards, so spaces inside them survive.
Does it shorten colours or merge rules?
No. This is a basic whitespace and comment minifier only; it does not rewrite selectors, values or colours.