CSS Minifier

Compress CSS by stripping whitespace, comments, and redundant syntax — free, no signup required.

Input CSS
Minified Output
Original: 0 BMinified: 0 BSaved: 0.0%

CSS Full Form

CSS stands for Cascading Style Sheets — the language browsers use to style HTML. CSS source files are written with generous whitespace, comments, and readable formatting. Browsers don't need any of that to apply your styles, so minification strips it all away to produce a smaller, faster-to-download stylesheet.

What this tool does

  • Strip comments — Removes /* ... */ comments (license blocks starting with /*! are preserved).
  • Collapse whitespace — Removes indentation, newlines, and redundant spaces around {, }, ;, :, ,, and combinators.
  • Drop redundant tokens — Removes the trailing semicolon before }, collapses duplicate semicolons.
  • Shorten values — Zero-units collapse (0px0), hex colors shorten where safe (#aabbcc#abc).
  • Byte savings — See original vs minified byte counts and percentage saved.

When you need a CSS minifier

  • Production builds — Smaller CSS files download faster and parse faster.
  • Critical CSS — When inlining above-the-fold styles in your HTML <head>, every byte counts.
  • Email templates — Most email clients need CSS inlined; minifying keeps the payload under provider size limits.
  • Embedded CSS — When you're pasting CSS into a JSON config, database row, or server-side template.

Privacy

Everything runs locally in your browser. Your CSS is never sent to our servers, not even for analytics. You can minify proprietary design tokens, unreleased themes, or internal enterprise styles without them leaving your machine.

Frequently Asked Questions

No. This tool performs only safe transformations — it never reorders selectors, merges rules, or removes any declarations. The resulting stylesheet has identical cascading behaviour to the original. If you rely on comment-based preprocessor directives (SASS, LESS, PostCSS), minify the compiled output, not the source.
Hand-written stylesheets shrink by 15–35%; frameworks like Tailwind or Bootstrap (already compact) shrink by 5–10%. After gzip or brotli the wire savings are smaller but still real. For the biggest impact, minify and then let your CDN compress.
Yes. !important, -webkit-, -moz-, -ms-, -o- prefixes, calc(), var(), custom properties, @supports, @media, @keyframes and every other valid CSS token stays exactly as you wrote it.
No. All minification happens in your browser. Nothing is sent to our servers, logged, or cached anywhere except the current browser tab. Refresh and it's gone.
Click Beautify to pretty-print CSS — minified or not — with indentation and one declaration per line. Comments that were stripped are not recoverable, but selector and declaration structure is fully restored.
For a quick one-off minify, this tool is fastest. For a regular build pipeline, use a tool like cssnano, lightningcss, or your bundler's built-in minifier — they can apply additional optimizations (rule merging, property reordering) that require AST parsing. This tool is for when you need a clean minify in seconds without installing anything.