CSS Formatter

No upload · runs in your browser
Indent
CSS in
0 characters
Formatted

Runs entirely in your browser, nothing is uploaded.

How it works

CSS Formatter and Minifier : Safe With url() and Strings

Tidy a messy stylesheet or minify it for production. Strings, url() values and comments are treated as untouchable, so nothing inside them can be reformatted by accident.

What this does
  • Any at-rule nests by brace depth, so @supports inside @media indents to the right level
  • One selector per line, split on top-level commas only, never on a comma inside :is() or :not()
  • Minify keeps the spaces CSS needs: inside calc(), and before the colon in a descendant selector
  • Unbalanced braces stop the run and say how many blocks are left open or stray
FAQ

No. Every comment is dropped, so a licence banner has to be put back afterwards.

Keep going