CSS to SASS Converter Online
Paste plain CSS and get the indented .sass flavour of it: no braces, no semicolons, structure carried by indentation.
Input CSS
Converted SASS
Example
Here's a quick before-and-after to show what this tool does. Drop in some CSS on the left and watch it convert to SASS indented syntax on the right, no curly braces, no semicolons.
CSS → SASS Conversion
Input CSS:
Converted SASS (indented syntax):
Click Sample to load the example above into the editor and see the conversion live. You can also upload a .css file directly.
What Is CSS to SASS Conversion?
SASS (Syntactically Awesome Style Sheets) is the original CSS preprocessor: it predates SCSS and uses an indented syntax that's clean and whitespace-significant, similar to Python or Pug. Instead of curly braces and semicolons, SASS uses indentation to define structure. This tool converts standard CSS into that indented SASS format.
The indented syntax still turns up in older Rails and Ruby projects and in teams that simply like it. If a CSS file has to join one of those, removing every brace and semicolon by hand is dull work; this page does it. Learn more about the difference between SASS indented syntax and SCSS in the official docs.
How to Use
Paste or Upload Your CSS
Drop a stylesheet into the left editor, or open a .css file from disk with Upload. Sample loads a short stylesheet if you'd rather watch the conversion before trying your own.
Conversion Happens Automatically
As you type or paste, the tool converts your CSS to SASS indented syntax in real time. Curly braces are removed, semicolons are stripped, and indentation takes over.
Copy or Download the Result
Click Copy to grab the output, or Download to save it as a .sass file. Run your Sass build once to confirm it compiles.
When Does This Help?
This converter is handy when you're migrating a plain CSS file to a SASS-based project, or when you want to refactor a stylesheet without doing the tedious manual conversion of removing every ; and {}. Putting the input and output side by side is also a fast way to learn the indented syntax.
Keep in mind: the converter does a flat conversion, it doesn't automatically nest selectors like .parent .child into deeply nested SASS. That kind of restructuring requires understanding your CSS architecture. If you want nesting, try the CSS to SCSS converter which builds a nested tree.
FAQ
What's the difference between SASS and SCSS?
SASS (indented syntax) and SCSS are both syntaxes of the Sass preprocessor. SCSS looks like regular CSS: it uses curly braces and semicolons. SASS uses indentation instead, with no braces or semicolons. Both compile to the same CSS. SCSS is more popular today, but SASS indented syntax is still used in many projects.
Does this tool nest selectors automatically?
No. This is a flat conversion. A rule like .parent .child { ... } becomes .parent .child in SASS indented syntax, not a nested block. If you want automatic nesting, try the CSS to SCSS converter which builds a nested selector tree.
Can I use the converted SASS file directly in my project?
Yes. Save it as a .sass file and your SASS compiler (like the Sass CLI or a build tool like webpack or Vite) will compile it to CSS just like SCSS. Make sure your build config is set up to handle .sass files.
What happens to CSS comments?
They are dropped, both /* ... */ and //. Copy any you want to keep back in afterwards; the indented syntax accepts both kinds.
Does this work with CSS variables and calc()?
Yes. CSS custom properties (variables) and functions like calc(), clamp(), and var() pass through unchanged. The converter only touches the structural syntax, not the property values.
Is my CSS processed on the server?
No. The rewrite is done by script in this page, so internal design-system code stays local.
Related Tools
For the opposite direction there is the SCSS to CSS converter, and the CSS to Less converter covers the other big preprocessor.