{ }

CSS Minifier

Minify CSS code to reduce file size. Remove comments, whitespace, and optimize selectors for production-ready stylesheets.

CSS minifierminify CSScompress CSSCSS compressorreduce CSS sizeCSS optimizerstylesheet minifier
Original:752 bytes
Minified:473 bytes
Saved:37.1%
Input CSS
Minified Output
.container{max-width:1200px;margin:0 auto;padding:20px}.header{background-color:#333;color:white;padding:1rem 2rem}.header .logo{font-size:24px;font-weight:bold}.nav{display:flex;gap:1rem}.nav a{color:inherit;text-decoration:none;transition:opacity .2s ease}.nav a:hover{opacity:.8}.btn{display:inline-block;padding:10px 20px;border:none;border-radius:4px;cursor:pointer}.btn-primary{background-color:#007bff;color:white}.btn-secondary{background-color:#6c757d;color:white}

What is CSS Minifier?

CSS Minifier is a free online tool that compresses CSS stylesheets by removing whitespace, comments, and unnecessary characters. Smaller CSS files improve page load times and overall website performance. All processing happens in your browser for complete privacy.

Common Use Cases

Production Stylesheets

Minify CSS before deploying to reduce page load times.

Email Templates

Compress inline CSS for HTML email templates with size constraints.

Third-Party CSS

Minify vendor CSS files that are not already optimized.

Quick Optimization

Fast minification without configuring build tools like webpack or gulp.

How to Use This Tool

  1. Paste your CSS code into the input area
  2. Enable or disable comment removal and whitespace compression
  3. View the minified output with size savings
  4. Copy or download the compressed CSS file