CSS to SCSS
Paste flat CSS below.
Paste flat CSS and convert it into nested SCSS. Selectors sharing a prefix are grouped, descendant selectors become nested blocks, and media queries are kept intact at the end.
Paste flat CSS below.
Each CSS rule is split into selector parts, and parts are merged into a tree so .card .title becomes a .title block nested inside .card. Rules that share a selector are merged, combinators like > are kept with their selector, and at-rules such as media queries are emitted unchanged.
Nesting mirrors your HTML structure, which makes stylesheets shorter and easier to scan. Converting legacy flat CSS is the quickest first step when migrating a project to Sass, and the output compiles with any standard Sass toolchain.