Sass to CSS Compiler
CV-49Paste Sass written in the indented syntax (no braces, no semicolons) and get plain CSS. Dart Sass runs in your browser; for files with braces use the SCSS tool.
Runs in your browser. Nothing is uploaded.
Sass code
CSS code
How to use it
- Paste your indented Sass into the input box, or open a .sass file.
- Pick Expanded or Compressed output.
- Press Compile Sass to CSS.
- Copy the CSS or download it as a .css file.
Indented syntax, not SCSS
This tool reads the original Sass syntax, where nesting comes from indentation and lines end without semicolons. Mixins can be written with = and included with +, or with @mixin and @include. If your file uses braces and semicolons it is SCSS, so use the SCSS to CSS compiler instead.
What you get back
Variables, nesting, mixins, functions, @if, @each, maps and @extend are resolved and plain CSS comes out. Indent every child by the same amount: a line that dedents to a level that does not exist is an error with a line number. Loud /* */ comments stay in Expanded output and // comments are dropped.
Limits
Only the text in the box is compiled. @use and @import of other files fail because the page fetches nothing, though built-in modules like sass:math work. Deprecation warnings are not shown, so check your build for them. For a fast look at the structure, convert the Sass to SCSS first and read the braces.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Line 2, column 6: Undefined variable. | A $variable is used before it is defined. | Define it above its first use. |
Line 3, column 1: Inconsistent indentation, expected 4 spaces. | A line is indented differently from its siblings. | Use the same indentation for every line at one level. |
Line 1, column 9: Can't find stylesheet to import. | A @use or @import points at another file. | Paste that file's content in and remove the line. |
Questions people ask
How do I compile a .sass file to CSS?
Paste the content of the .sass file into the input box and press Compile Sass to CSS. The page runs Dart Sass in indented mode and returns CSS. Pick Compressed for a single line. The file never leaves your browser.
What is the difference between Sass and SCSS?
They are two syntaxes for the same language. SCSS uses braces and semicolons like CSS. Sass, the older syntax, uses indentation and newlines. This page compiles the indented one. The two convert into each other without changing meaning.
Can I paste SCSS into this Sass compiler?
No. SCSS has braces and semicolons that the indented parser rejects, and you will see an error with a line number. Use the SCSS to CSS page for that, or convert it to the indented syntax with the SCSS to Sass converter.
Why do I get an indentation error?
The indented syntax decides nesting from leading whitespace, so every line in a block must start at the same column. Mixing tabs and spaces, or dedenting to a column that no earlier line used, makes the compiler stop at that line.
Does the compiler support @use and modules?
Built-in modules such as sass:math and sass:map work. Loading your own files does not, because the page reads only the pasted text and fetches nothing. Paste the other file above your code instead.
About this tool
Runs the Sass compiler (Dart Sass, the JavaScript build) in your browser on indented Sass 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.