← All tools

CSS to SCSS Converter

Group adjacent CSS selectors into nested SCSS while preserving rule order and declaration values.

css-to-scss-converterLOCAL WORKSPACE

Enabling local controls…

Runs locally without uploading or running your code. Each input accepts up to 128 KiB of UTF-8.

SCSS output

Enter your source or load the sample to get a result.

How to use this tool

Paste CSS or open a local UTF-8 .css file. Adjacent rules can share a parent selector. Selector lists stay together, and top-level @media and @supports keep their own blocks. Complex values use literal Sass interpolation to keep their CSS text.

When not to use it

Use flat CSS with declarations, unescaped selectors and property names, and at most one layer of conditional blocks. Other at-rules, CSS nesting, empty rules and some lexical constructs stop conversion with a location. Compile the result with Dart Sass in your project to check integration.