CSS Formatter

Beautify minified or compressed CSS with consistent indentation

Input CSS

Formatted CSS

Nothing you paste here is ever uploaded — formatting happens entirely in your browser.

About this tool

Minified CSS is great for production but painful to read or debug by eye — every rule is squeezed onto one line with no spacing. This formatter walks through your stylesheet token by token, placing each selector, declaration, and closing brace on its own line and indenting nested rules two spaces deeper for every level of brace depth. It's a lightweight, rule-based beautifier rather than a full CSS parser, so it works well on typical stylesheets without needing to understand every possible CSS syntax edge case.

Will this validate my CSS or catch syntax errors?

No — it reformats spacing and indentation based on braces and semicolons, but it doesn't parse property names or values, so invalid CSS will still format without complaint. Use a CSS linter separately if you need validation.

Does it handle nested rules like media queries?

Yes — indentation is tracked by brace depth, so rules nested inside an @media block or similar are indented one level deeper than the surrounding stylesheet, and it unwinds correctly as each closing brace is reached.

Can I use this on SCSS or LESS too?

Since the formatter works purely off braces and semicolons rather than plain-CSS-only syntax, it generally handles the structural parts of SCSS and LESS reasonably well, though preprocessor-specific features like mixins or nesting shorthands aren't specially interpreted.