Sass to SCSS Converter
Convert legacy indented Sass code to modern SCSS syntax instantly. Automatically adds braces, semicolons, and fixes mixins (@include/@mixin).
About
This tool automates the tedious process of migrating from the older, indentation-based Sass syntax to the modern, standard SCSS (Sassy CSS) syntax. While Sass relies on whitespace and newlines to define scope, SCSS uses curly braces { } and semicolons ;, making it fully compatible with standard CSS.
The converter parses your code line-by-line, calculating indentation depth d to reconstruct the nesting logic. It automatically translates shorthand operators: the mixin definition = becomes @mixin, and the include operator + becomes @include. It intelligently distinguishes between CSS properties (which require semicolons) and nested selectors.
Formulas
The core logic tracks the indentation level L of each line to determine block structure.
Shorthand translation rules apply regular expression mapping:
Reference Data
| Feature | Sass (Indented) | SCSS (Standard) |
|---|---|---|
| Nesting | Indentation based | Braces { ... } |
| Line End | Newline | Semicolon ; |
| Mixin Definition | =my-mixin | @mixin my-mixin |
| Mixin Include | +my-mixin | @include my-mixin |
| Variables | $color: red | $color: red; |
| Extend | @extend .error | @extend .error; |
| Import | @import "reset" | @import "reset"; |