CSS Formatter

Paste compressed or inconsistent CSS and get neatly formatted stylesheets with one declaration per line and a blank line between rules. You can choose the indentation, brace style and wrap length. The tool also warns if braces or parentheses look unbalanced, which usually means a rule is broken.

How to use the CSS Formatter

  1. Paste your CSS or press Load example.
  2. Choose indent size, brace style and wrap length.
  3. Press Format CSS.
  4. Check any warnings, then copy or download the stylesheet.

Features

Benefits

Frequently asked questions

Can it format SCSS or Less?

Simple SCSS and Less usually format well because the syntax is similar, but features like mixins with complex arguments may not indent perfectly.

Does it reorder or remove properties?

No. Only whitespace and line breaks change; your selectors and declarations stay in the same order.

How do I make CSS smaller instead?

Use the Code Minifier tool, which removes comments and whitespace and reports how many bytes you saved.

Related tools