๐Ÿ”’ Runs in your browser โ€” nothing is uploadedโœ“ Free, no signup

SCSS Formatter

Paste SCSS to format it with Prettier โ€” consistent indentation for nesting, mixins, variables and media queries.

Loading...

0 characters

Formatted SCSS

Loading...

When should you use the SCSS Formatter?

  • Cleaning up minified or inconsistently written SCSS
  • Matching your team's formatting before a code review
  • Reading third-party SCSS more easily

How to use the SCSS Formatter

  1. 1

    Paste SCSS

    Paste a stylesheet or snippet.

  2. 2

    Set indentation

    Choose 2 or 4 spaces or tabs and a line width.

  3. 3

    Check errors

    Syntax errors show the line and column.

  4. 4

    Copy or download

    Copy the result or download styles.scss.

Examples

Nested rules

Before

.card{color:$primary;&:hover{color:blue}.title{margin:0}}

After

.card {
  color: $primary;
  &:hover {
    color: blue;
  }
  .title {
    margin: 0;
  }
}

Common errors and how to fix them

CssSyntaxError: Unclosed block
A { has no matching }. Check the line shown in the error.
I need plain CSS
This formats SCSS but doesn't compile it. Use the CSS Minifier's Beautify for plain CSS.
Related tools:ย LESS Formatter ยท CSS Minifier ยท PX to REM Converter

More from Code Formatters & Minifiers

Free tools that run in your browser โ€” no signup, nothing uploaded.

SCSS Formatter FAQ

No โ€” it formats SCSS source code. Compiling needs Sass, which you'd run in your build.

No, only the SCSS syntax (with braces and semicolons), which is what most projects use.

Prettier, so the result matches Prettier in your editor or CI.

Yes, both // and /* */ comments are preserved.

No, property order is kept as written.

No. Everything runs in your browser, so your stylesheet never leaves your device.