CSS Formatter
Format CSS, SCSS and Less stylesheets into readable, consistently indented code.
About the CSS Formatter
The CSS Formatter makes compressed or inconsistent stylesheets readable again, one declaration per line with consistent indentation. It understands CSS, SCSS and Less.
Everything runs in your browser, so your input is never uploaded to a server.
How to use the CSS Formatter
- Paste your stylesheet or open a file.
- Choose the syntax (CSS, SCSS or Less) and indentation.
- Copy or download the formatted code.
Frequently asked questions
Can I format SCSS with nesting and variables?
Yes. Choose SCSS (or Less) and nested rules, variables and mixins are formatted correctly.
Does it remove unused rules?
No. Formatting never removes or reorders rules; it only changes whitespace and layout.
Related tools
JSON Formatter
Format and beautify JSON with configurable indentation and optional key sorting. Errors are reported with exact line and column.
HTML Formatter
Beautify messy or minified HTML into clean, indented markup using Prettier, right in your browser.
JavaScript Formatter
Beautify JavaScript and JSX with Prettier. Choose indentation, quotes and semicolons.
TypeScript Formatter
Format TypeScript and TSX code with Prettier, including types, generics and decorators.
PHP Formatter
Beautify PHP code following PSR-style formatting with the Prettier PHP plugin.
SQL Formatter
Format SQL queries for MySQL, PostgreSQL, SQLite, SQL Server and more with keyword casing options.