CSS Minifier
Paste your CSS and get a smaller, faster file instantly. Comments, spaces and line breaks are removed safely — strings, calc() and media queries keep working.
Runs in your browser — your code is never uploaded. Tip: drop a file on the input box, or press Ctrl + Enter.
How to Minify CSS
Make any stylesheet smaller in three quick steps — no software to install.
Paste or Upload CSS
Paste your CSS into the left box, upload a .css file, or drag and drop it.
Minify
The CSS is minified as you type. Click Minify CSS any time to run it again.
Copy or Download
Copy the minified CSS or download it as style.min.css and use it on your site.
Removes
Comments, spaces, new lines
Shows
Size saved in %
Safe for
calc(), strings, @media
Privacy
Runs in your browser
Works on
Phone & computer
Price
100% free
What the CSS Minifier Changes
Only characters the browser ignores are removed — your styles look exactly the same.
| Before | After | Why |
|---|---|---|
/* comment */ | removed | Comments are not needed by the browser |
margin: 0 auto; | margin:0 auto; | Space after a colon is not needed |
.a > .b , .c { | .a>.b,.c{ | Spaces around > , { } are not needed |
color: red; } | color:red} | The last semicolon in a rule is optional |
calc( 100% - 2rem ) | calc(100% - 2rem) | Spaces around + and − inside calc() are kept (they are required) |
/*! MIT licence */ | kept (option) | Licence comments can be kept for legal reasons |
What Can You Use It For?
Popular ways people use CSS Minifier.
Faster Websites
Smaller CSS loads faster and helps your Core Web Vitals score.
WordPress & Themes
Minify custom CSS before adding it to your theme or Customizer.
Email Templates
Shrink inline styles to stay under email size limits.
Production Builds
A quick way to minify one file without setting up a build tool.
Tips for the Best Result
- Keep your original, readable CSS file for editing — only upload the minified copy to your site.
- Turn on gzip or Brotli on your server too; together with minifying, CSS can shrink by 80% or more.
-
Name the file
style.min.cssso everyone knows it is the minified version. - Want to read minified CSS again? Use a CSS beautifier or paste it into our HTML Editor to test it live.
Frequently Asked Questions
Quick answers about CSS Minifier.
It removes everything the browser does not need — comments, extra spaces, tabs and line breaks — so the file is smaller and downloads faster. Your styles look and work exactly the same.
Usually 15–40%, depending on how many comments and spaces the file has. The tool shows the exact percentage saved under the output.
Yes, it is safe. The minifier keeps strings, url() values, media queries and the spaces that are required inside calc(), so nothing changes visually.
Indirectly, yes. Smaller CSS makes pages load faster, which improves Core Web Vitals and user experience — both matter for Google rankings.
Yes. Comments that start with /*! are kept when "Keep /*! licence */ comments" is ticked.
Minify the compiled CSS. Plain SCSS/LESS files often work too, but browsers only read the compiled CSS.
No. Everything runs in your web browser, so your code and data never leave your device.
Yes — 100% free, with no sign-up and no limits.
Related Free Tools
Ready to Use CSS Minifier?
Scroll up and get your result in seconds. 100% free, no sign-up needed.
Start Now