0 characters
0 characters

How to Use

1
Paste your CSS. Copy your stylesheet and paste it into the CSS to Minify box. You can paste a single rule or an entire stylesheet.
2
Get the minified output. The compressed CSS appears automatically as you type. You can also click Minify CSS to run it on demand.
3
Check the savings. The counter below the output shows the new character count and how much smaller the file is as a percentage.
4
Copy the result. Click Copy Result and paste the minified CSS into your production stylesheet or build pipeline.

What CSS Minification Does

Minification removes everything a browser does not need to render your styles. That means comments, line breaks, indentation, and the spaces around braces, colons, and semicolons. The final semicolon before a closing brace is also dropped because it is optional. The result is a single compact block of CSS that behaves identically to the original but takes up far fewer bytes.

Smaller stylesheets download faster, which improves page load time and Core Web Vitals. The content inside quoted strings and url values is left untouched, so your fonts, background images, and generated content keep working.

Worked Example

Before: /* button */ .btn { color: #ffffff; padding: 10px 20px; } After: .btn{color:#ffffff;padding:10px 20px}

Frequently Asked Questions

Does minifying change how my CSS works?

No. Minification only removes characters that the browser ignores, such as comments, line breaks, and extra spaces. The rules, selectors, and values stay exactly the same, so the page renders identically. The browser reads minified CSS the same way it reads the original.

How much smaller does CSS get after minifying?

It depends on how the original file is formatted, but a typical reduction is between 10 and 40 percent. Files with many comments and lots of indentation shrink the most. Combined with gzip compression on your server, the saving over the wire is even larger.

Is it safe to minify CSS?

Yes. This tool removes only whitespace and comments and protects the content inside quoted strings and url values, so it will not break selectors or property values. Everything runs in your browser and nothing is uploaded to a server.

Should I keep an unminified copy of my CSS?

Yes. Always keep your original formatted CSS as the source you edit. Minified CSS is hard to read and maintain, so treat it as a build output. Minify again whenever you change the source file before deploying.

Does this work with SCSS or Sass?

This tool minifies plain CSS. SCSS and Sass must first be compiled to regular CSS using a Sass compiler. Once you have the compiled CSS output, you can paste it here to minify it for production.

Get fresh reads straight to your inbox

Get notified when we publish new articles. Unsubscribe anytime.