CSS Minifier

Compress your CSS for faster websites

Please enter valid CSS

Features

Single‑line output
Removes comments
Removes whitespace
Reduces file size
Minifies as you type
Minifies on paste

Sample

/* Comment */  
body {
    background-color: blue;
    color: white;
  }
  h1 {
    background–color: purple;
  }

Converts to:

body{background-color:blue;color:white}h1{background–color:purple}

Why Minify Your CSS?

CSS minification removes unnecessary characters from your stylesheets – spaces, comments, line breaks, and extra semicolons – without changing how the browser interprets them. This results in smaller file sizes and faster loading times.

Faster Page Loads

Smaller CSS files mean fewer bytes to download, especially critical for mobile users or slow connections.

Fewer bytes on the wire

A smaller stylesheet can download faster. That does not by itself guarantee a higher search ranking.

Optimized Workflow

Keep your source code readable with indentation and comments, then minify for production – best of both worlds.

Reduced Bandwidth Costs

Smaller files mean less data transfer, saving money for high-traffic websites.

How It Works

1

Paste or Type CSS

Enter your unminified CSS code in the left textarea. It minifies in real-time as you type or paste.


2

Instant Minification

Our tool removes whitespace, comments, and extra semicolons, producing a single-line output.


3

Copy & Deploy

Click the copy button to grab the minified CSS and use it in your production website.

Frequently Asked Questions

A CSS example, including what this minifier will not keep

Paste this rule:

/* keep? */
body {
  margin: 0px;
  color: #ffffff;
}
h1 { color: #ffffff !important; }

The minifier removes the block comment, including a /*! license */ comment, deletes the line breaks, drops the space before !important, shortens #ffffff to #fff, and turns 0px into 0. The readable result is one line similar to body{margin:0;color:#fff}h1{color:#fff!important}.

It does not rename classes, merge duplicate selectors, or check that the CSS is valid. A broken rule is still a broken rule after the spaces are gone. Keep the commented source in version control and minify a copy for the page you publish.