Home » Developer Tools » SCSS Minifier
Paste SCSS source and get a smaller SCSS file in seconds, with variables, nesting, and mixins kept intact.
Last updated 13 November 2026
Your code never leaves your browser. Everything runs locally on your device.
This tool minifies SCSS source. It strips comments and extra whitespace while keeping variables, nesting, mixins, media queries, and extends exactly as SCSS. It does not compile SCSS to CSS, so the output is still SCSS, ready to feed to your Sass build step.
That distinction matters, because a plain CSS minifier would break SCSS syntax. This tool understands SCSS constructs and keeps spaces exactly where a selector or a value needs them, for example in descendant selectors and inside calc expressions. Everything runs in your browser, so your code is never uploaded to a server.
Minifying SCSS means shrinking SCSS source code by removing comments and extra whitespace. The result is still SCSS. Variables stay variables, nesting stays nesting, and mixins stay mixins. Nothing is compiled, so the file you get back feeds straight into your Sass build step, exactly like the file you pasted in.
That is the key difference between minifying and compiling. Compiling turns SCSS into plain CSS, which a browser can read. Minifying only makes the SCSS file smaller, which makes it faster to store, share, and load into a build. If you need plain CSS at the end, compile the minified SCSS with Sass as usual. This tool never compiles, and it never claims to.
Minifying is only safe if the tool knows which spaces matter and which do not. This tool was built for SCSS, so it keeps every construct that gives SCSS its power.
Variables like $primary keep their names and values, so every place that uses the variable still points at the same value. Nested rules keep their structure, so a rule inside .card still applies only inside .card. Mixins and includes survive untouched, as do media queries, extends, and interpolation in the form #{...}.
The tool also knows where a space changes meaning. A space between two selectors is a descendant combinator, so it is kept. A space before :hover in a selector like .nav a :hover is kept too, because dropping it would change which element the rule targets. Spaces inside calc expressions are kept, because calc needs them around plus and minus to parse correctly.
Here is a short example run through the tool, with the exact numbers:
Input, 67 characters:
$primary: #333; .box { color: $primary; margin: 0; padding: 10px; }
Output, 57 characters:
$primary:#333;.box{color:$primary;margin:0;padding:10px;}
The output is 10 characters shorter. Ten divided by 67 is 0.149, so the file is about 15 percent smaller. The variable $primary is still there, and the rule still says exactly what it said before, only with the gaps removed.
The Load Sample button shows the same effect on a larger file. Its 290 character sample, with theme variables, a card mixin, and a calc width, minifies to 214 characters, which is 76 characters removed, about 26 percent smaller.
Two places where careless minifying breaks code are calc expressions and descendant selectors, and this tool handles both.
In calc, the plus and minus signs need spaces around them, or the browser cannot parse the value. So calc(100% - 20px) stays exactly as written, with the spaces around the minus kept. A plain CSS minifier that strips those spaces would hand you broken code.
In selectors, a space can be the whole meaning. In .card .title, the space says the title must sit inside a card. In .nav a :hover, the space before :hover says the hover applies to a link inside the navigation, not to the navigation itself. This tool keeps those spaces, so the minified file targets exactly the same elements as the original.
Honest limits are worth knowing before you trust a tool with your code.
First, it does not compile SCSS to CSS. The output is SCSS, and you compile it with Sass as usual.
Second, when Strip comments is on, which is the default, every comment is removed, including licence comments that start with /*! . If your file carries a licence header, turn Strip comments off before you minify, and the header is kept.
Third, it works on one file at a time. There is no batch mode, and there is no stated size limit, so a very large file may take a moment in your browser.
Fourth, it only understands SCSS. Indented .sass files, which use no braces and no semicolons, are not supported.
Fifth, it does not check your code for errors. If your SCSS has a mistake, the tool minifies what you pasted as best it can and shows no warning, so check the output before you use it.
Finally, it does not do the extra shrinking some tools offer, like shortening hex colours or removing units from zero values. The savings come from comments and whitespace only.
Minify when the file is finished and ready to share or store. A smaller file is quicker to paste into a build, quicker to send to a teammate, and quicker to keep in version control alongside the readable original. Keep the readable copy for editing, and minify a fresh copy whenever you publish.
Minify before you hand SCSS to a build step that reads from a slow drive or a shared folder, where every byte still counts. Do not minify while you are still writing the code, because the compact output is hard to read and edit.
If your SCSS needs tidying up instead of shrinking, use the SCSS Beautifier to format it into clean readable code. If the file is plain CSS with no SCSS constructs, the CSS Minifier is the better match.
Yes, it is completely free with no sign up.
No. This tool minifies SCSS source. The output is still SCSS, with variables, nesting, and mixins intact, and you compile it with Sass as usual.
Yes. Minifying only removes comments and extra whitespace. Your variables, nesting, mixins, and media queries are unchanged.
Yes. Spaces that act as descendant combinators are always kept, so a selector that targets a child element keeps targeting that child element.
Yes. Spaces around plus and minus inside calc expressions are kept, because calc needs them to parse correctly.
No. All minifying happens in your browser on your own device, so your code never leaves your computer.
No, not while Strip comments is on. That option is checked by default, and it removes every comment, including licence comments that start with /*! . If your file has a licence header, uncheck Strip comments before you minify, and the header is kept.
The page does not state a size limit. Your code is minified in your browser, so a very large file may take a moment to process. If a huge file feels slow, split it into smaller pieces and minify each one.
No. This tool works on one file at a time. Paste or upload one file, copy or download the result, then repeat the same steps for the next file.
No. This tool works with SCSS only, the Sass syntax that uses braces and semicolons. Indented .sass files, which use no braces and no semicolons, are not supported.
Minifying shrinks SCSS source and the output is still SCSS. Compiling turns SCSS into plain CSS that a browser can read. This tool only minifies, so compile the result with Sass as usual.
Yes. Plain CSS is valid SCSS, so this tool shrinks it the same way. For CSS only files, the CSS Minifier is the dedicated tool for the job.
If your SCSS needs tidying up instead of shrinking, try the SCSS beautifier to format it into clean readable code.