← All Tools
CSS Beautify Formatter🔒 100% local
Format and prettify CSS. Privacy-first, no server uploads, no tracking.
Reformats minified or badly indented CSS: each selector on its own line with an opening brace, two spaces of indent per nesting level, one declaration per line, a single space after the colon, comments on their own line, and runs of blank lines collapsed to one. Strings and comments are tracked while scanning, so a semicolon or brace inside either one does not split a rule. Your stylesheet is reformatted in the page and never leaves it.
How to use it
- Paste the CSS - minified is fine - and press Process.
- The first line reports how many rule blocks were seen; the formatted stylesheet follows.
- Check any declaration that came back without a trailing semicolon; the formatter adds one.
- Copy Output takes the whole formatted stylesheet, Clear empties both boxes.
Worked example
.btn{color:red}becomesBeautified 1 rule.
.btn {
color: red;
}The default example in the box.
@media (max-width:600px){.a{color:red}}becomesBeautified 2 rules.
@media (max-width:600px) {
.a {
color: red;
}
}The count is 2 because every opening brace is counted, and the at-rule counts as one of them.
When to use it
- Making a pasted snippet from a build output readable before reviewing it.
- Widening a one-line stylesheet into one declaration per line so a diff shows real changes.
- Checking the nesting depth of a block by eye when a selector is not matching as expected.
What it does not do
- Unbalanced braces are not reported. The input .x{color:red comes back as '.x {' with 'color: red;' and 'Beautified 1 rule.' - no closing brace, no warning.
- The rule count is the number of { characters, so at-rule blocks inflate it and a doubled count is normal for levels of wrapping.
- It only reformats. Invalid property names, unknown at-rules and a missing final semicolon pass through untouched, and there is no minify direction.
- Indentation is fixed at two spaces and a blank line is inserted between rules, so there is no option to match a different house style.