Minificateur CSS
Compress CSS code by removing comments, whitespace and optimizing values.
About CSS Minification
CSS minification reduces file size by removing comments, whitespace, and unnecessary characters. It also optimizes hex colors (#AABBCC to #ABC) and removes units from zero values (0px to 0). Smaller CSS files load faster and improve Core Web Vitals scores. All processing happens in your browser.
How It Works
- Paste your CSS: Enter any CSS stylesheet — from a single rule to an entire production stylesheet.
- Minify: Click Minify to strip comments, whitespace, and redundant characters while preserving all rules.
- Copy the output: The minified CSS is ready to paste directly into your project or deploy to production.
Why Minify CSS?
Every byte of CSS the browser downloads delays page rendering. Minification removes comments, unnecessary whitespace between selectors and declarations, redundant semicolons, and can merge shorthand properties — typically reducing file size by 20–40%. Smaller CSS files improve Core Web Vitals scores, reduce bandwidth costs, and speed up load times particularly on mobile connections. CSS minification is a standard step in every production web build pipeline and directly contributes to better Google PageSpeed Insights scores.
What Gets Removed
- Comments —
/* ... */blocks stripped unless marked important - Whitespace — spaces, tabs, and newlines between tokens
- Trailing semicolons — last declaration in a rule block
- Zero units —
0px→0where allowed - Color shorthand —
#ffffff→#fff