CSS Minifier
Minify CSS by removing comments and whitespace. Free, no signup.
How It Works
Paste your CSS and click Minify. The tool removes comments, unnecessary whitespace, trailing semicolons before closing braces, and excess newlines to produce compact CSS. The original size and savings are shown, and everything runs in your browser.
What Gets Removed
| Element | Action |
|---|---|
| /* comments */ | Removed entirely, including license /*! */ comments |
| Extra whitespace | Runs of spaces, tabs, and newlines collapsed |
| Spaces around { } ; : , | Removed |
| Spaces around > ~ + | Removed around combinators |
| Semicolon before } | The final ; in a block is dropped |
Why Minify CSS?
Smaller stylesheets download faster, which improves page load times and Core Web Vitals. Minification is a standard build step for production websites: you keep a readable source file for editing and serve the compact version to visitors.
Frequently Asked Questions
How do I minify CSS online?
Paste your CSS into the box and click Minify. The tool strips comments and extra whitespace and shows the compressed result, which you can copy with the Copy button. It also reports the original size, the minified size, and the percentage saved.
What does the CSS minifier remove?
It removes /* ... */ comments, collapses runs of whitespace and newlines, deletes spaces around characters like braces, colons, semicolons, commas, and combinators (> ~ +), and drops the last semicolon before a closing brace. Your selectors and property values are kept intact.
Does minifying CSS change how my styles work?
No. Minification only removes characters browsers ignore, so the compressed CSS renders exactly the same. Note that all comments are stripped, including special /*! ... */ license comments, so keep an unminified copy if you need those.
How much smaller will my CSS get?
It depends on how much whitespace and how many comments the file has. The tool shows the exact byte counts before and after and the percentage saved, so you can see the reduction for your specific stylesheet.
Is my CSS uploaded anywhere?
No. Minification runs entirely in your browser with JavaScript, so your CSS never leaves your device and nothing is stored or sent to a server.