{ } .minify $color: #abc; @include flex; margin: 0; CSS SCSS LESS Sass CSS Minifier & Unminifier

CSS Minifier & Unminifier

Minify or unminify CSS, SCSS, LESS, Sass, Stylus & more. Compress code for production or paste minified CSS to make it readable again. Auto-detects language, verifies code integrity. Free, real-time, 100% browser-based.

Real-time
Minify mode: Paste your CSS code and we'll compress it — removing spaces, comments, and line breaks to create the smallest file for production.

Input

0 chars
Drop your stylesheet file here .css, .scss, .less, .sass, .styl

Minified Output

0 B
Original 0 B
Minified 0 B
Savings 0%
Rules 0
Selectors 0
Properties 0
@media 0
Colors 0
!important 0

One Tool for All CSS Languages

Unlike most minifiers that only handle plain CSS, this tool auto-detects and supports 8 stylesheet languages: CSS, SCSS, Sass, LESS, Stylus, PostCSS, CSS Modules, and Utility-First CSS. It recognizes your $variables, @mixins, nesting, @import chains, and every language-specific syntax — preserving them perfectly during minification or formatting.

CSS Standard stylesheets
SCSS / Sass Variables, mixins, nesting
LESS Variables, mixins, guards
Stylus Flexible syntax
PostCSS @apply, custom props
CSS Modules :global, :local, composes

Why Minify & Unminify CSS?

Minifying removes unnecessary whitespace, comments, and line breaks — making your files smaller and faster to download. Think of it like removing extra spaces from a sentence: “The   cat   sat” becomes “The cat sat” — same meaning, less space.

Unminifying (also called beautifying) does the reverse: it takes compressed CSS that looks like one long line and restores proper indentation, line breaks, and spacing so you can actually read and edit it. Perfect when you need to debug production code or understand someone else's minified stylesheet.

Our tool goes beyond basics. It optimizes color values (#aabbcc → #abc), shortens zero units (0px → 0), removes empty rules, and can merge duplicate selectors — all while verifying your code structure stays identical.

Advertisement
Ad

How to Use — 3 Simple Steps

01

Paste or Upload Your Code

Paste CSS, SCSS, LESS, Sass, or Stylus code into the input panel. Or click Upload to load a file. You can also drag & drop. The tool auto-detects your language and shows which features it found.

02

Choose Minify or Unminify

Minify compresses your code for production (smaller file size). Unminify / Beautify does the opposite — paste any compressed or minified CSS and it restores proper indentation, line breaks, and spacing to make it human-readable again. Toggle advanced options to fine-tune optimizations.

03

Copy, Download, or Verify

Output updates instantly as you type. Copy to clipboard or download as a file. Check the green “Verified” badge confirming your code structure is preserved, and the “What Changed” panel showing every optimization.

Optimization Reference

OptimizationBeforeAfterWhat it means
Whitespace removalmargin: 10px ;margin:10pxExtra spaces removed
Block comments/* note */ h1{}h1{}Developer notes stripped
Line comments// note
h1{}
h1{}SCSS/LESS notes stripped
Color shortening#ffaa00#fa0Same color, fewer chars
Zero optimizationmargin: 0px 0remmargin:0 0Zero needs no unit
Trailing semicolons{color:red;}{color:red}Last one is optional
Empty rule removal.unused { }(removed)Does nothing, safe to drop

Pro Tips

Minify for Production

Always serve minified CSS in production. Combined with gzip, you can reduce delivery size by 70–90%.

Unminify to Verify

After minifying, switch to “Unminify / Beautify” to see the clean structure. This proves nothing was lost — just made smaller.

Watch the Integrity Badge

The green “Verified” badge confirms your code structure is preserved. If it turns orange, review the “What Changed” panel.

SCSS/LESS Single-Line Comments

This tool handles both /* block */ and // line comments. Select the right language or use Auto-Detect for best results.

Advertisement
Ad

Frequently Asked Questions

What CSS languages does this tool support?

This tool supports CSS, SCSS, Sass (indented), LESS, Stylus, PostCSS, CSS Modules, and Utility-First CSS (like Tailwind). It auto-detects the language from your code, or you can select it manually from the dropdown.

Will minification break my code?

No. Minification only removes characters that don't affect functionality — like whitespace, comments, and line breaks. The green “Verified” badge confirms your code structure is preserved. You can switch to “Unminify / Beautify” mode to visually verify the original structure is intact.

What does “What Changed” show?

The “What Changed” panel shows a detailed breakdown of every optimization applied: how many comments were removed, how much whitespace was saved, how many colors were shortened, and exactly how many bytes each optimization contributed. Full transparency into what happened to your code.

How does auto-detection work?

The tool scans your code for language-specific patterns: $variables and @mixin for SCSS, @-prefixed variables for LESS, indentation-based syntax for Sass, @apply for Tailwind/PostCSS, :global/:local for CSS Modules, and more. It shows the detected language badge and feature tags so you can verify.

Can I unminify / uncompress CSS with this tool?

Yes! Click the “Unminify / Beautify” button at the top, then paste your minified or compressed CSS. The tool instantly restores proper indentation, line breaks, and spacing — turning that single long line back into clean, readable code. Works with CSS, SCSS, LESS, and all supported languages.

Is my code data safe?

Yes, completely safe. All processing happens in your browser using JavaScript. Your code is never sent to any server. You can verify by checking the Network tab in your browser’s developer tools — no requests are made.

Is this tool free?

Yes, completely free with no limits on file size or usage. No registration required. Process as many files as you need.