CSS Formatter and Beautifier
Turn compressed CSS into readable code with one declaration per line and consistent indentation.
How to use CSS Formatter
Step by step
Paste your code
Type or paste it into the left box, or paste a snippet from your editor.
Choose options
Pick the indent size or other settings. The result updates as you type.
Copy or download
Copy the result or save it as a file.
Features and benefits
What you get
Live result
The output updates as you type or change an option.
Private
Your code is processed in your browser by this page and is not sent anywhere.
Clear errors
Problems are reported with a short message instead of silent failure.
No sign-up
Open the page and start.
Supported formats and limitations
What to expect
Supported formats
CSS
Size limits
Limited by browser memory
Limitations
Runs fully in your browser. Very large inputs (several MB) can slow the page.
Frequently asked questions
Quick answers
Is the meaning of my CSS changed?
No. Only whitespace changes, so the browser reads the same rules.
Does it support nesting?
Nested rules are indented by their braces, so modern CSS nesting is also laid out.
Related tools
More from Developer Tools
JSON Formatter
Format, indent, sort and minify JSON. Invalid JSON is reported with the line and column of the problem.
JSON Validator
Check whether your JSON is valid. If it is not, see the exact line and column and a plain-English reason.
HTML Formatter
Indent and tidy HTML. Inline tags stay on the line, and embedded CSS and JavaScript are formatted too.
Related guides
Read more about this tool