SCSS Formatter screenshot

SCSS Formatter

Format SCSS with a real tokenizer: nesting, mixins, // comments and #{interpolation} all survive. Runs in your browser.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What formatting SCSS does

The stylesheet is tokenized before anything is rewritten, so a brace inside a string, a semicolon inside a url() data URI and a hash-brace interpolation are each carried through untouched instead of being read as structure. Nesting is indented one level per block, every declaration lands on its own line, and a line comment stays where you wrote it. Nothing is evaluated: $brand stays $brand and @include stays @include, because resolving them would mean knowing the rest of your project.

How to use it

SCSS Formatter: paste the SCSS into the box above, set Indent (default 2), and press Run to get the formatted SCSS below.

Worked example

Input:

$brand: #0066cc;
// Sidebar card
@mixin card($pad: 16px) {
  padding: $pad;
  &:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
  .title { font-weight: 600;
    &--large { font-size: 24px; } }
}

Output:

$brand: #0066cc;
// Sidebar card
@mixin card($pad: 16px) {
  padding: $pad;
  &:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  }
  .title {
    font-weight: 600;
    &--large {
      font-size: 24px;
    }
  }
}

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads SCSS and returns formatted SCSS; reloading the page discards both.

The stylesheet is tokenized before anything is rewritten, so a brace inside a string, a semicolon inside a url() data URI and a hash-brace interpolation are each carried through untouched instead of being read as structure. Nesting is indented one level per block, every declaration lands on its own line, and a line comment stays where you wrote it. Nothing is evaluated: $brand stays $brand and @include stays @include, because resolving them would mean knowing the rest of your project.

Format SCSS with a real tokenizer: nesting, mixins, // comments and #{interpolation} all survive. Runs in your browser.

How to use it

SCSS Formatter: paste the SCSS into the box above, set Indent (default 2), and press Run to get the formatted SCSS below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads SCSS and returns formatted SCSS; reloading the page discards both.

What to Expect

Best for

  • Converting SCSS to formatted SCSS when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

$brand: #0066cc; // Sidebar card @mixin card($pad: 16px) { padding: $pad; &:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .2); } .title { font-weight: 600; &--large { font-size: 24px; } } }

Sample output

$brand: #0066cc; // Sidebar card @mixin card($pad: 16px) { padding: $pad; &:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .2); } .title { font-weight: 600; &--large { font-size: 24px; } } }

Frequently asked questions

How do I use the scss formatter?

SCSS Formatter: paste the SCSS into the box above, set Indent (default 2), and press Run to get the formatted SCSS below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.