CSS Formatter
Format CSS with consistent indentation, or minify it for production.
What is the CSS Formatter?
Formatting puts each declaration on its own line; minifying removes whitespace and comments to reduce file size.
How does it work?
CSS is parsed with Prettier’s PostCSS parser (so syntax errors are caught) and printed. Minify mode then removes comments and unnecessary spaces.
Example
.btn{padding:8px;color:#fff} becomes a readable rule block.
Frequently asked questions
Is my data sent to a server?
No. This tool runs entirely in your browser; nothing you paste is uploaded or stored.
Does it support SCSS or Less?
It is designed for standard CSS. Simple SCSS may work, but advanced syntax is not guaranteed.
Related tools
Enable JavaScript to use this calculator.