CSS Minifier — Compress CSS Stylesheets Online

Remove all unnecessary whitespace, comments, and redundant rules from CSS files. Typically reduces file size by 40–70% for faster page loads. Supports modern CSS variables and nesting.

Key Features

How to Use

  1. Paste your CSS stylesheet content into the editor.
  2. Click "Minify CSS" to process the rules.
  3. Inspect the compressed output and size reduction metrics.
  4. Copy the minified CSS directly to your clipboard or save it.

Example

Sample input

.btn {
  color: #fff;
  padding: 8px 12px;
}
.btn:hover { opacity: 0.9; }

Sample output

.btn{color:#fff;padding:8px 12px}.btn:hover{opacity:.9}

Edge Cases

Frequently Asked Questions

Does this minifier support CSS custom properties (variables)?

Yes. Modern CSS variables defined with --variable-name syntax and var() functions are fully supported and preserved intact.

Are CSS source maps affected by minifying?

This tool processes raw CSS code into a compact string. If you need source maps for production debugging, build tools like Vite or Webpack are typically used during bundling.

Can minifying break CSS specificity or cascade order?

No. Rule ordering and selector specificity are strictly preserved; only non-functional characters like whitespace and comments are removed.

Related Tools

Privacy notice: when you run this tool, your input is sent over HTTPS to our server, processed in memory and returned. It is not stored or logged. Avoid pasting live secrets such as private keys or passwords.