Part of Code & data tools
SCSS formatter: beautify Sass stylesheets online
This page targets SCSS/Sass syntax (nesting, `$variables`, `@mixin` / `@include`). For plain CSS after compilation, use the CSS formatter instead.
How to use this converter
- Paste SCSS—partials, mixins, or a full `.scss` file.
- Pick an indent size that matches your project (often 2 spaces).
- Click Format to expand braces and nest levels, or Minify for a compact blob.
- Copy back into your editor and run your usual Sass compiler or linter.
Nesting, variables, and mixins
Formatted SCSS keeps parent selectors, `&` references, and nested media queries aligned so you can spot missing braces quickly. Dollar variables and maps stay as written—the tool does not resolve values or expand `@mixin` bodies.
If you paste CSS that was already compiled from Sass, nesting is gone. Prefer the CSS formatter for that output, or reformat the original SCSS source when you still have it.
Beautify vs minify
Beautify is for editing and code review. Minify collapses whitespace for size checks or quick embeds; it is a poor day-to-day edit format. Comments—including license headers—may be stripped in minify mode, so keep originals in git.
Typical workflow with CSS and HTML
Format the SCSS source here, compile locally or in CI, then inspect the CSS if you need to debug cascade issues.
Pair with the HTML formatter when cleaning email templates that ship inline styles, and with the CSS formatter when comparing compiled output to hand-written rules.
Before and after examples
| Original | Converted | Notes |
|---|---|---|
| .card{$p:1rem;&__title{margin:0}} | Indented nesting + variable | Component partial |
| @mixin center{display:flex;justify-content:center} | Readable mixin block | Shared utility |