CSS Formatter

Paste minified or messy CSS and get tidy code with one property per line, ready to read and edit.

Loading tool…

How to use the CSS Formatter

  1. Paste your CSS (minified CSS works too).
  2. Pick 2 spaces, 4 spaces or tabs for indentation.
  3. Copy the formatted CSS or download it as a .css file.

Frequently asked questions

Can it expand minified CSS?

Yes. Paste a one-line .min.css file and it is expanded into separate rules with one declaration per line.

Does it support media queries and nested rules?

Yes. @media, @supports, @keyframes and nested blocks are indented by level.

Does formatting change how my CSS works?

No. Only spaces and line breaks change; selectors, values, strings and comments are kept.

What if my CSS has an error?

If a { or ( is never closed, or a quote or comment is left open, the tool tells you so you can fix it first.