Free CSS Formatter & Beautifier
Paste your minified or messy CSS below to instantly format it with proper indentation and line breaks. Configurable indent size. Copy result to clipboard in one click.
About the CSS Formatter
This free CSS formatter and beautifier reformats CSS code with consistent indentation, one property per line inside each rule block, and a blank line between rule blocks. It handles standard CSS selectors, media queries, keyframes, and nested at-rules.
Use it to clean up minified CSS from a CDN, tidy vendor-prefixed stylesheets, or prepare CSS for a pull request review.
How to Format CSS Online
Paste Your CSS
Copy minified or disorganised CSS and paste it into the left input area.
Set Indent
Choose 2 spaces, 4 spaces or tabs from the indent selector.
Format
Click "Format CSS". The right pane shows the beautified output instantly.
Copy
Copy the formatted CSS to your clipboard with one click.
Frequently Asked Questions
Yes. @media, @keyframes, @supports and other at-rules are handled correctly, with proper indentation of nested rules inside the block.
Yes. Block comments (/* ... */) are preserved in their original position in the formatted output.
Formatting adds whitespace and indentation for human readability. Minifying removes all unnecessary whitespace to reduce file size for production. Use the CSS Minifier for production output.
This formatter is designed for standard CSS. SCSS/Less with nesting, variables, and mixins may not format correctly. Use compiled CSS output for best results.