SASS to CSS Converter
Explains the differences between indented SASS (.sass) syntax and CSS with side-by-side examples.
Copiado!
Suporta regras planas (sem aninhamento).
SASS (.sass) usa indentação ao invés de chaves. Exemplo:
.box\n color: red\n padding: 8pxEquivalente em CSS:
.box {\n color: red;\n padding: 8px;\n}Variáveis: $cor: red. Aninhamento e mixins seguem mesma lógica do SCSS.
From indentation to braces and semicolons
Someone sent you a chunk of .sass, the dialect with no braces and no semicolons, and your project uses .scss or plain CSS. The conversion is pure reformatting, but doing thirty lines by hand gives you exactly what you would expect: one missing semicolon and one stray brace, discovered when the build fails. Paste the indented block and take the braced version from the other side.
Parsing is driven by indentation. A line starting at column zero is treated as a selector and opens a block; an indented line is treated as a declaration and split at the first colon, becoming property and value with a semicolon appended. This is syntax reformatting, not compilation: nothing is resolved, nothing is computed. The note under the field states the limit out loud, flat rules only, and it is worth taking literally.
Nesting does not work here. An indented line using the parent reference ampersand is read as if it were a declaration and comes out mangled, and its children get flattened into the block above. A dollar variable at column zero is also read as a selector. Use it on flat blocks, for reading and quick conversion. If the file has nesting, mixins or includes, run the official Sass compiler instead. There is a copy button, and everything happens in your browser.
Frequently asked questions
What is the difference between .sass and .scss?
Does it resolve variables and mixins?
What if my snippet has nested blocks?
Related Tools
CSS to SASS Converter
Convert plain CSS to the indented SASS syntax, without braces or semicolons. Paste your CSS and copy the SASS to modernize your project styling.
SCSS to CSS Converter
Strips simple SCSS features (variable declarations and // comments) producing an approximate CSS for inspection.
CSS to SCSS Converter
Adapts CSS to SCSS preserving rules and turning CSS custom properties into SCSS variables when detected.
CSS to Stylus Converter
Convert plain CSS into the concise Stylus syntax, without braces or semicolons. Paste your CSS and copy the Stylus to modernize your project styling.
Stylus to CSS Converter
Explains converting Stylus templates (optional braces/colons) into standard CSS with examples.
CSS to LESS Converter
Convert CSS stylesheets to LESS syntax, turning custom properties (--var) into @variables. Modernize your CSS and copy the ready-to-use code.