A SCSS formatter restructures SCSS/SASS code with proper nested selector indentation, each property on its own line, and blank lines between rule blocks. Whether you are cleaning up hand-written SCSS, reformatting a design system's stylesheet, or tidying up mixin definitions before committing, this tool applies standard SCSS conventions instantly.
Formatted SCSS will appear here...
Example Snippets
How to Use the SCSS Formatter
SCSS pasted from design tokens, copied from component libraries, or written quickly in a sprint often has collapsed or inconsistent indentation. A SCSS formatter expands each property onto its own line, correctly indents nested rules, and separates rule blocks with blank lines — making stylesheets readable and maintainable.
Step 1: Paste Your SCSS
Copy your SCSS or SASS code and paste it into the input area. The formatter handles nested selectors, $variable declarations, @mixin and @include, @extend, @import/@use/@forward, and @media queries.
Step 2: Choose Indentation
SCSS typically uses 2-space indentation (matching CSS convention). Select 2 spaces (default), 4 spaces, or tabs. Click Format SCSS to apply.
Step 3: Copy or Download
The formatted SCSS appears with syntax highlighting. Click Copy for clipboard access or Download to save as a .scss file.
SCSS Formatting Best Practices
Standard SCSS formatting: each property on its own line, opening brace on the same line as the selector, blank lines between rule blocks, and $variables declared at the top of each block. Nested selectors should not go deeper than 3-4 levels to maintain readability. The & parent selector is widely used for BEM modifiers (&--modifier) and pseudo-classes (&:hover).
FAQ
Is the SCSS formatter free?
Yes, completely free with no signup required. Format unlimited SCSS or SASS code in your browser.
Is my SCSS code safe?
Yes. All formatting runs locally in your browser. Your SCSS code is never sent to any server.
What is the difference between SCSS and SASS?
SCSS uses braces {} and semicolons like CSS, while SASS uses indentation-based syntax (no braces). This formatter handles SCSS syntax. SASS indented syntax would need a separate tool.
Does the formatter handle SCSS nesting?
Yes. The formatter correctly indents nested selectors, pseudo-classes (&:hover), BEM modifiers (&--modifier), and media query blocks (@media) within parent selectors.
Can I minify SCSS?
Yes. Click Minify to strip comments, remove blank lines, and collapse whitespace — producing compact SCSS ready for review or processing by a CSS preprocessor.
Does the formatter handle SCSS variables, mixins, and extends?
Yes. The formatter properly handles $variable declarations, @mixin with parameters, @include calls, @extend, @import/@use/@forward, and @function definitions.