Formatter
CSS Minifier
Minify CSS online by removing comments, whitespace, and unnecessary formatting. Compress stylesheets locally in your browser.
Tool
Minify CSS online by removing comments, whitespace, and unnecessary formatting. Compress stylesheets locally in your browser.
This tool runs in your browser. Your input is processed locally and is not uploaded.
About this Tool
Use this free CSS Minifier to reduce the size of stylesheets without changing their intended rules. Paste CSS code, remove comments, indentation, line breaks, and unnecessary spacing, and copy or download the compressed result. Everything is processed directly in your browser, so private stylesheets and project code are not uploaded.
Examples
- body { margin: 0; padding: 0; font-family: Arial, sans-serif; }
- .button { background: #2563eb; color: white; padding: 0.75rem 1rem; }
- @media (max-width: 768px) { .grid { grid-template-columns: 1fr; } }
Frequently Asked Questions
What does the CSS Minifier remove?
It removes comments, indentation, line breaks, and unnecessary whitespace around selectors, declarations, and punctuation.
Does CSS minification change the design?
It should not. The minifier preserves selectors, properties, values, custom properties, media queries, and other CSS rules.
Are CSS comments removed?
Regular comments can be removed to reduce file size. Important license comments beginning with an exclamation mark may be preserved.
Is my CSS uploaded?
No. CSS processing runs locally in your browser.