How to use the CSS to SCSS Converter
Convert CSS to SCSS in four steps:
Paste your CSS
Paste flat CSS rules into the input area. You can include any valid CSS including selectors, pseudo-classes, media queries, and CSS custom properties (--variable-name).
Configure conversion options
Toggle options to control: nesting of child selectors, CSS custom property to SCSS variable conversion, ampersand (&) prefix for modifier selectors, and media query hoisting into parent rules.
Review nested SCSS output
The output shows properly nested SCSS with SCSS variable declarations at the top. Child selectors appear indented inside parent blocks, and pseudo-classes use the & modifier.
Copy or download
Click Copy to copy the SCSS to your clipboard, or Download to save it as a .scss file ready to drop into your Sass project.
When to use this tool
Use the CSS to SCSS converter when migrating from plain CSS to a Sass workflow:
- →Migrating a legacy CSS stylesheet to a Sass-based project without rewriting every rule by hand
- →Converting exported CSS from a design tool (Figma, Adobe XD) into maintainable SCSS structure
- →Restructuring flat component CSS into nested BEM blocks for a new SCSS component library
- →Transforming CSS custom properties from a design token file into SCSS variable declarations
- →Nesting pseudo-class selectors (:hover, :focus, :active) inside parent rules using & notation
- →Preparing CSS code samples for SCSS tutorials or documentation that demonstrates nesting
- →Quickly checking how a CSS ruleset would look when refactored to SCSS nesting conventions