1001Ferramentas
🔄Converters

SASS to CSS Converter

Explains the differences between indented SASS (.sass) syntax and CSS with side-by-side examples.

Suporta regras planas (sem aninhamento).

SASS (.sass) usa indentação ao invés de chaves. Exemplo:

.box\n  color: red\n  padding: 8px

Equivalente 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?
They are two syntaxes for the same language. The .scss form uses braces and semicolons, just like CSS; the .sass form uses indentation and line breaks. Variables, nesting and mixins exist in both.
Does it resolve variables and mixins?
No. There is no compiler on the page. The output keeps the structure of the input, just written with braces and semicolons.
What if my snippet has nested blocks?
Do not convert it here. Every indented line is treated as a declaration, so child selectors come out broken. Use the Sass compiler on the command line for that.

Related Tools