How to use it
This SCSS to CSS converter compiles SCSS into plain CSS that browsers understand, with nothing to install. It substitutes variables, unwraps nested rules, expands mixins (including @content), merges nested media queries and evaluates color functions such as darken and rgba. When it meets something it does not support, it stops with a clear error and a line number instead of emitting wrong CSS.
How to compile SCSS to CSS
- Paste your SCSS. If it uses variables or mixins defined in other files, paste those definitions at the top.
- Compile with "Run tool" or Ctrl + Enter.
- If an error appears, adjust the construct on the reported line using the notes below.
- Copy the CSS or download it as a text file.
A worked example
Take $brand: #8f39e8;, $gap: 8px;, a mixin flex-center($dir: row) that sets display: flex, flex-direction: $dir and align-items: center, and a .card block containing padding: $gap * 2, border: 1px solid lighten($brand, 30%), an &:hover with rgba($brand, .1), an &__title with darken($brand, 10%), an .icon child that includes flex-center(column), and a nested @media (min-width: 768px) that sets padding: $gap * 3. The output is:
| Selector | Compiled declarations |
|---|---|
.card | padding: 16px; border: 1px solid #ddc2f8; |
.card:hover | background: rgba(143, 57, 232, 0.1); |
.card__title | color: #7519d5; |
.card .icon | display: flex; flex-direction: column; align-items: center; |
.card inside @media (min-width: 768px) | padding: 24px; |
Supported features
- Variables with scoping,
!defaultand!global. - Nesting with
&, including suffixes like&__titleand&--large, plus#{}interpolation. @mixinand@includewith default and named arguments and@contentblocks.- Nested
@media, which is merged into combined queries such asscreen and (min-width: 600px), plus@supports,@keyframes,@font-faceand@at-root. - Nested properties (
font: { size: 18px; }) and%placeholderselectors, which are dropped from the output because@extendis not available. - Arithmetic with
+,-and*on compatible units, and the color functionsdarken,lighten,rgba,mix,transparentizeandopacify.
Line comments (//) are removed; block comments are kept. Plain CSS imports using url() or a .css file pass through untouched.
Unsupported features and the errors you will see
Control flow (@if, @each, @for, @while), @function, @extend, the module system (@use, @forward) and imports of Sass partials stop compilation with a message such as @each is not supported by this converter (line 4). Silently skipping them would give you incomplete CSS that only fails later in the browser. Practical workarounds:
- Unroll short loops by hand: three color modifiers become three rules.
- Replace
@extendwith a mixin and@include. - For
Undefined variable: $brand, paste the variables file above your code. - For
@import of Sass files is not supported here, paste the imported file's contents instead.
Units and arithmetic
$gap * 2 gives 16px and 16px + 4px gives 20px. Mixed units are not combined: 10px + 2em is left as written, which browsers reject, so use calc() instead; calc(100% - #{$gap * 2}) compiles to calc(100% - 16px). Division with / is deliberately not evaluated, so shorthands like font: 16px/1.5 survive.
When this tool fits
It is ideal for checking what a snippet compiles to, fixing a stylesheet on a machine without a build setup, moving an old SCSS fragment into a CMS field that only accepts CSS, or learning Sass and seeing the result immediately. For production builds of larger projects, keep using the official Sass compiler in your toolchain.
Compilation runs in JavaScript in your browser; the code is not uploaded, and the page only increments an anonymous usage counter. To go the other way and nest plain CSS, use the CSS to SCSS converter; to tidy the result, the CSS beautifier is one click away. Other utilities live under developer tools.