Format Code Now
/
ConvertSCSS to CSS Converter Next: SCSS to LESS Converter ›

SCSS to CSS Compiler

CV-53

Paste SCSS and get plain CSS. The page runs Dart Sass, the reference Sass compiler in its JavaScript build, in your browser, so what you get is what sass would write from the same file.

Runs in your browser. Nothing is uploaded.

SCSS code

CSS code

How to use it

  1. Paste your SCSS into the input box, or open a .scss file.
  2. Choose Expanded or Compressed output.
  3. Press Compile SCSS to CSS.
  4. Copy the CSS or download it as a .css file.

What the compiler resolves

Variables, nesting, mixins and @include, @extend, functions, @if and @each, maps, placeholders and the built-in modules such as sass:math and sass:color are all worked out. The output is ordinary CSS with no Sass left in it. Silent // comments are removed; loud /* */ comments stay in Expanded output.

No files, no @use of your own modules

The page compiles only what is in the box. A @use or @import that points at another file fails with a Sass error, because nothing is fetched. Built-in modules work, for example @use "sass:math". Paste partials above your code if you need them, and drop the @use lines that referred to them.

Checking the output

Compare a few rules with what you expect, especially after @extend, which can merge selectors, and division, which should use math.div. Deprecation warnings are hidden on this page, so a file that compiles here can still print warnings in your own build. Use the SCSS to Sass converter if you want the indented syntax instead.

Error messages and what to do

MessageWhat it meansFix
Line 2, column 6: Undefined variable.A $variable is used before it is defined.Define it above its first use or fix the spelling.
Line 1, column 9: Can't find stylesheet to import.A @use or @import points at another file, which this page cannot load.Paste the file content into the box and remove the line.
Line 1, column 8: unmatched "}".There is a } with no matching {.Remove the extra } or add the missing {.

Questions people ask

How do I convert SCSS to CSS?

Paste the SCSS into the input box and press Compile SCSS to CSS. The page runs Dart Sass and shows plain CSS. You can pick Expanded or Compressed output, then copy it or download a .css file. No command line or install is needed.

Which Sass compiler does this use?

Dart Sass, the reference implementation, in its pure JavaScript build. It is the same engine behind the sass npm package, so modern syntax such as @use, math.div and the sass: modules works. The older node-sass and LibSass are not used.

Why does @use or @import fail?

Those statements load another file, and this page only sees the text in the box. Without that file the compiler stops and reports that it cannot find the stylesheet. Paste the other file's content into the input and delete the @use or @import line.

Is the compiled CSS minified?

Only if you pick Compressed. Expanded gives readable CSS with one declaration per line. Compressed removes whitespace and block comments. Neither option adds vendor prefixes, so run autoprefixing in your build if you target old browsers.

Why are my SCSS // comments missing from the CSS?

Sass treats // comments as silent and never writes them out. Only /* */ comments are copied. If you want a comment in the CSS, write it with /* ... */ instead.

About this tool

Runs the Sass compiler (Dart Sass, the JavaScript build) in your browser on SCSS syntax. Variables, mixins, functions, loops, maps and the built-in sass: modules are resolved, so the output is plain CSS. Files cannot be loaded: @use and @import of another file fail with a clear error, because the page reads only what you paste. Built-in modules such as sass:math work. Deprecation warnings are hidden. // comments are dropped from the output.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.