FormatterHQ

SASS to SCSS Converter

Convert .sass files to SCSS. The indented Sass is compiled with Dart Sass and re-nested with SCSS braces and semicolons.

Input SASS
Output SCSS
Ready.

How to use the SASS to SCSS Converter

  1. Paste your indented Sass code into the Input editor, or use Sample, Upload file or Load URL.
  2. Press Convert. The indented Sass is compiled first, then written out as SCSS.
  3. Check the status bar for errors such as an undefined variable, which are reported with a line number.
  4. Use Copy or Download above the output panel to take the SCSS output with you.

What the SASS to SCSS converter does

Many teams move from the indented syntax to SCSS because SCSS accepts plain CSS, works with more editor tooling, and is what most documentation shows. The two syntaxes compile identically, so switching is purely about the source format and the people and tools that read it. This SASS to SCSS converter compiles your .sass code with Dart Sass, then prints the result as nested SCSS with braces and semicolons. Calculations and module functions are evaluated, so the output is ready to use as it is.

Example

@use 'sass:math'
$base: 16px

.article
  font-size: $base
  h2
    font-size: math.div($base * 3, 2)
    margin: 0 0 $base * .5
  p + p
    margin-top: $base
.article {
  font-size: 16px;
  h2 {
    font-size: 24px;
    margin: 0 0 8px;
  }
  p + p {
    margin-top: 16px;
  }
}

math.div($base * 3, 2) became 24px, and the adjacent-sibling selector p + p stayed nested under .article.

Manual conversion without evaluating

If you would rather keep variables, mixins and loops, the syntax translation from indented Sass to SCSS is mechanical, and you can do it by hand for small files:

  1. Add { after every selector and control directive, and } where indentation decreases.
  2. Add ; after every declaration, variable, @use, @include and @extend.
  3. Replace the shorthand =name with @mixin name and +name with @include name.
  4. Join selector lists that continue over several lines, or keep them with commas at line ends.

Use this converter's output as a reference to check that your hand-converted file compiles to the same CSS.

Limitations

  • Evaluated output: variables, mixins and loops are replaced by their results.
  • Partials loaded with @use or @import must be pasted in.
  • // comments disappear during compilation; /* */ comments are kept.

Tooling after the switch

One practical reason to move to SCSS is tooling. Prettier formats SCSS but not the indented syntax, Stylelint's standard SCSS configurations target the brace syntax, and most editor extensions and online examples assume SCSS. Converting also lets you paste CSS from browser developer tools or documentation straight into your stylesheets, since any valid CSS is valid SCSS. Code review also tends to be easier, because reviewers see the same brace structure they know from plain CSS and from most online examples.

Compile the SCSS with the SCSS Compiler to verify it, or format it with the SCSS Formatter. Conversion runs in your browser.

Frequently asked questions

Does converting Sass to SCSS change my styles?
No. The SCSS is produced from the CSS that Dart Sass generates from your input, so it compiles to the same result.
Why are math.div and other functions replaced with numbers?
The converter evaluates the Sass before printing SCSS. To keep the expressions, translate the syntax by hand using the steps above.
Do I need to convert all .sass files at once?
No. Dart Sass lets SCSS and indented files use each other, so you can migrate one file at a time.
Can the converter read @use "variables"?
Only built-in modules like sass:math. Local partials must be pasted into the input because the browser cannot read your files.
Can I convert SCSS back to the indented syntax?
Yes. Use SCSS to SASS, which works the same way in the other direction. The old sass-convert command belonged to Ruby Sass, which reached end of life in 2019; Dart Sass does not include a converter, so browser tools or a manual rewrite are the remaining options.
Will Prettier and Stylelint work on the converted file?
Yes. Both support SCSS, so after converting you can format the file with Prettier and lint it with a configuration such as stylelint-config-standard-scss. Neither tool supports the indented .sass syntax, which is one of the most common reasons teams switch.

Last updated September 26, 2026

Related tools