Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
CSS Minifier

CSS Minifier

Minify CSS code online to reduce file size. Removes comments, collapses whitespace, optimizes values, and shortens hex colors.

The CSS Minifier is a free online tool that compresses CSS code to reduce file size. It removes comments, collapses whitespace, optimizes zero values, and shortens hex colors to produce smaller, production-ready stylesheets.

  1. Paste or type your CSS code in the input panel on the left.
  2. Toggle the Remove comments option as needed.
  3. Click the Minify button (or press Ctrl+Enter) to minify.
  4. View the compression stats showing original vs minified size.
  5. Click Copy to copy the result, or Download to save as a file.
  • Remove CSS comments (/* ... */).
  • Collapse unnecessary whitespace and newlines.
  • Remove trailing semicolons before closing braces.
  • Optimize zero values (0px → 0).
  • Shorten hex colors (#ffffff → #fff).
  • Preserve calc() expressions to maintain valid CSS.
  • Compression stats showing original size, minified size, and savings.
  • Upload files or paste code directly.
  • 100% client-side — your code never leaves your browser.
Is my code sent to a server?
No. All minification happens locally in your browser. Your code is never uploaded or stored.
Will minification break my CSS?
The minifier safely handles calc() expressions and media queries. It only removes unnecessary characters like whitespace and comments.
How much file size reduction can I expect?
Typical CSS files see 30–60% size reduction depending on the amount of comments and whitespace in the original code.
Input
Output
Error

Paste code on the left to minify automatically

Original 0 B Minified 0 B
Saved 0%
|
Paste your CSS code and click Minify to compress it.
Use Ctrl+Enter to minify quickly.
Toggle Remove comments to keep or strip CSS comments.
Want to learn more? Read documentation →
1/4
Start typing to search...
Searching...
No results found
Try searching with different keywords