CSS Formatter

Re-indent CSS so each declaration sits on its own line and nested at-rules are indented, without touching strings, comments, or values inside url().

A CSS formatter splits declaration blocks onto separate lines and indents nested at-rules. Strings, comments, and url() values are tokenised first, so their contents are never reflowed.

Output

                

Paste or type something above.

Questions about css formatter

Does it break strings or data URIs?
No. Quotes, comments, and url() values are read as tokens, so their contents are copied through untouched.
What does lowercasing change?
Property names and hex colour digits are lowercased. String values and comments are never modified.
Will it reformat inside a media query?
Yes. The nested block is indented one level deeper, and its closing brace goes on its own line.