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.
Copiado!
Suporta regras planas (sem aninhamento).
No SASS indentado, omita { } e ; e use indentação consistente (geralmente 2 espaços).
/* CSS */\n.btn { color: white; padding: 8px; }\n\n/* SASS */\n.btn\n color: white\n padding: 8pxPlain CSS in the indented Sass syntax
The indented Sass syntax, the one behind .sass files rather than .scss, drops braces and semicolons entirely. Converting half a dozen rules by hand is fine; converting forty is not, and a single leftover semicolon is enough to make the compiler complain. Paste CSS on one side and the .sass version appears on the other, with two spaces of indentation per declaration.
Underneath sits a deliberately small parser: it scans selector and block pairs and rewrites each declaration as an indented prop: value line, keeping the colon that indented Sass still requires. That works cleanly for flat rules, and it has no concept of a block inside a block. Feed it a media query: the inner rules convert while the @media line itself drops out of the result with no warning.
So pull media queries out, convert each block on its own, then put the @media line back and indent the content under it. Comments in /* */ get glued to the selector line and need a quick cleanup. The tool also never invents nesting and never promotes a repeated color to a $variable, which stays your call. Copy and clear buttons sit below the output, and no CSS ever leaves your browser.
Frequently asked questions
What is the difference between .sass and .scss?
Will it nest .card .title for me?
What happens to @media?
Related Tools
SASS to CSS Converter
Explains the differences between indented SASS (.sass) syntax and CSS with side-by-side examples.
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 LESS Converter
Convert CSS stylesheets to LESS syntax, turning custom properties (--var) into @variables. Modernize your CSS and copy the ready-to-use code.
LESS to CSS Converter
Strips LESS @variables and // comments producing approximate CSS suitable for visual checking.
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.