CSS Code Beautifier
Paste minified or messy CSS below and get clean, readable code back — consistent indentation, one declaration per line, comments preserved, media queries nested properly.
How to use
- Paste your minified or messy CSS into the input box.
- Choose indentation size and toggle the formatting options.
- Click Format CSS, then copy the result or download it as a .css file.
What the formatter does
Each rule gets its own block with the opening brace on the selector line, every declaration on its own line, and closing braces aligned with their selectors. Nested blocks such as @media queries indent one extra level. Comments are kept exactly where they were written.
Frequently Asked Questions (FAQ)
What does the CSS beautifier do?
It takes minified or messy CSS and rewrites it with consistent indentation, one declaration per line, opening braces on the selector line, and optional blank lines between rules.
Can I sort CSS properties alphabetically?
Yes. Turn on the sort option and the tool orders the properties inside every rule from A to Z.
Are comments and media queries preserved?
Yes. Comments stay in place and nested blocks such as media queries are indented one extra level automatically.
Is my CSS sent to a server?
No. Formatting runs entirely in your browser, so your code never leaves your device.