CSS Formatter

NEW

Beautify and format CSS code

FreeNo sign-upDeveloper Tools →

CSS Formatter puts each selector and each declaration on its own line with consistent indentation, turning a compressed stylesheet back into something you can scan. A Minify button does the opposite when you need the compact form.

It formats the text as written and leaves the order of rules and properties unchanged, so the cascade and the result on the page stay the same.

Advertisement

How to use CSS Formatter

1

Paste CSS

Add the stylesheet.

2

Format or minify

Choose the output you need.

3

Copy

Use the copy button.

Use Cases

  • Reading a minified stylesheet
  • Making diffs between CSS versions meaningful
  • Standardising formatting before a commit

Frequently Asked Questions