SCSS Beautify/Minify
Format or minify SCSS (Sass) stylesheets. Beautify adds indentation for nested rules; minify removes comments and whitespace.Overview
The SCSS Beautify/Minify tool processes SCSS as CSS:- Beautify — Indents rules, properties, and nested selectors with 2 spaces
- Minify — Removes comments, collapses whitespace, and strips unnecessary characters
@import/@use.
Use Cases
Sass cleanup
Format SCSS files for readability and team consistency
Build optimization
Minify SCSS before compilation to reduce intermediate file size
Migration
Reformat legacy Sass files with consistent indentation
Debugging
Beautify minified SCSS from third-party libraries
Actions
- Beautify
- Minify
Indents rules, properties, and nested selectors with 2 spaces per level.Input:Output:
Implementation Details
The SCSS beautifier uses the same CSS beautification algorithm as the CSS Beautify tool. SCSS-specific syntax (variables$var, mixins @mixin, nesting, @extend) is treated as CSS syntax.
Source: lib/tools/engine.ts:525-528
Key logic
The beautifier does not parse SCSS semantics (variable scope, mixin expansion,
@extend resolution). It formats based on CSS structure only.SCSS Feature Support
Variables
Variables
Nested rules
Nested rules
Mixins & includes
Mixins & includes
@include calls are treated as properties.Parent selectors (&)
Parent selectors (&)
&) is preserved and formatted correctly.Keyboard Shortcuts
Cmd/Ctrl+Enter— Beautify (default)Cmd/Ctrl+Shift+C— Copy outputCmd/Ctrl+Shift+S— Download output
Related Tools
LESS Beautify/Minify
Format or minify LESS stylesheets
CSS Beautify/Minify
Format or minify vanilla CSS (same algorithm)
HTML Beautify/Minify
Format or minify HTML markup