tool

SCSS Formatter, Validator & Minifier

Beautify Sass (SCSS) stylesheets, find syntax errors and safely minify SCSS without breaking interpolation or maps.

input
0 characters
1
result

paste your code and choose format or minify

Beautify, check and minify SCSS (Sass) stylesheets

Paste SCSS with nested rules, variables, mixins, maps, loops and #{interpolation} and choose what you need. Format turns cramped or inconsistent Sass into clean, indented code with Prettier. Validate finds syntax errors like an unclosed block or a stray brace, with the line and column. Minify strips comments and whitespace while leaving strings, url() values and interpolation untouched, and every minified result is checked against the original before it's shown. Everything runs in your browser.

What can you do?

  1. 1. Format SCSS
    Indent nested selectors, put one declaration per line, add consistent spacing after colons and in maps, and keep // and /* */ comments where you wrote them.
  2. 2. Validate SCSS syntax
    Catch unclosed blocks, unexpected closing braces and malformed rules, reported as “Line 1, column 1: Unclosed block”, before your Sass build fails.
  3. 3. Minify SCSS safely
    Remove // and /* */ comments and unnecessary whitespace. /*! licence comments are kept. Spaces that matter, such as in .a-#{$x} .b or calc(100% + 2px), are preserved.
  4. 4. Built-in safety check
    Before showing a minified result, the tool re-formats both versions and confirms they're equivalent. If it can't prove that, it shows a message instead of risky output.
  5. 5. Variable and mixin counts
    See how many $variables and @mixin definitions a file contains, handy when auditing a design system or theme.

Why format and validate SCSS?

SCSS nesting is powerful but quickly becomes hard to follow when indentation drifts. Three or four levels of & selectors, media queries and @include blocks with inconsistent spacing make it difficult to see which rule a declaration belongs to.

A formatter restores a clear structure that matches what the compiled CSS will look like, and a syntax check finds the missing brace that would otherwise surface as a confusing error from your build tool.

How to format or minify SCSS

  1. 1. Paste your SCSS
    A partial such as _buttons.scss, a whole theme file or a single nested rule all work.
  2. 2. Choose format, minify or validate
    Every action validates first, so the result is always based on SCSS that parses.
  3. 3. Fix any reported problem
    Use the line and column in the message to find the error, then try again.
  4. 4. Copy the result
    Copy the formatted or minified SCSS back into your project.

Example: SCSS formatted and minified

SCSSInput
$primary:#06b6d4;
@mixin card($p:20px){padding:$p;border-radius:12px}
.card{@include card(24px);
// hover state
&:hover{color:darken($primary,10%)}.title-#{$size}{font-weight:600}}
SCSSFormatted
$primary: #06b6d4;
@mixin card($p: 20px) {
  padding: $p;
  border-radius: 12px;
}
.card {
  @include card(24px);
  // hover state
  &:hover {
    color: darken($primary, 10%);
  }
  .title-#{$size} {
    font-weight: 600;
  }
}
SCSSMinified
$primary:#06b6d4;@mixin card($p:20px){padding:$p;border-radius:12px}.card{@include card(24px);&:hover{color:darken($primary,10%)}.title-#{$size}{font-weight:600}}

SCSS vs Sass vs CSS: which syntax do you have?

Differences between SCSS, the indented Sass syntax and plain CSS
SCSS (.scss)Indented Sass (.sass)CSS (.css)
BlocksCurly braces { }IndentationCurly braces { }
Line endingsSemicolonsNewlines, no semicolonsSemicolons
Variables$name: value;$name: value--name: value (custom properties)
Nesting, mixins, loopsYesYesNative nesting only
Supported by this toolYesNoUse the CSS formatter

Almost any valid CSS is also valid SCSS, so you can paste plain CSS here too, but the CSS formatter adds checks for unknown properties and values that only make sense for plain CSS.

When should you minify SCSS?

Browsers never see SCSS. It's compiled to CSS, and Sass can already produce compressed output with style: compressed, which is what you should ship. Minifying the SCSS source is useful in other situations: embedding a theme in a single-line config field, shrinking a snippet for a CMS or a no-code tool that compiles SCSS for you, or sharing a compact reproduction of a bug.

If you need the compiled CSS minified instead, compile it with Sass and then use the CSS minifier and validator.

Frequently asked questions

Does this tool compile SCSS to CSS?

No. It formats, validates and minifies SCSS source code. Variables, mixins and functions are kept as they are. Compiling requires the Sass compiler, for example through your build tool or the sass command-line tool.

Can I format the indented .sass syntax?

No. The indented syntax uses whitespace instead of braces and isn't supported by Prettier. Convert it to SCSS first (sass-convert, or by hand), or paste SCSS instead.

Why did minify say it couldn't minify safely?

The tool compares the formatted minified output with the formatted original. If they differ in any way it can't explain, it refuses rather than risk changing your styles. Formatting the same code still works.

Does validation catch undefined variables or mixins?

No. Validation checks syntax only. An undefined $variable, a missing @use module or a mixin called with the wrong arguments is reported by the Sass compiler when it builds your styles.

Are @use and @forward modules supported?

Yes. Module syntax such as @use "sass:math" as m; and namespaced calls like m.div() format and minify correctly.

Is my stylesheet uploaded?

No. Formatting, validation and minifying all run in your browser.