How to use the CSS Formatter
- Paste CSS, SCSS or Less, or open a stylesheet.
- Choose Beautify for readable code or Minify for production.
- Copy or download the result.
Beautify
Beautifying uses Prettier to put one declaration per line, normalise spacing and indentation, and format nested SCSS/Less rules — handy for reading minified third-party CSS or tidying hand-written styles.
Minify
Minifying removes comments and every whitespace character that doesn't affect meaning. It's deliberately conservative: spaces inside calc(), before pseudo-classes in descendant selectors, and inside strings and url() are kept. It doesn't merge rules or shorten colours, so the result is always equivalent to your input.
Frequently asked questions
Why does minify fail on invalid CSS?
The stylesheet is parsed before minifying so broken CSS is reported instead of silently producing broken output.
Should I minify SCSS?
Browsers can't read SCSS — compile it to CSS first, then minify the CSS.
Is what I enter stored or sent anywhere?
No. Calculations and processing happen in your browser. Nothing you type is sent to our servers. Some tools remember your last input in this browser's local storage for convenience; you can clear it at any time.