Reformat stylesheets so every selector, declaration, and closing brace sits on its own line with consistent indentation — including rules nested inside media queries.
Output
All processing happens in this browser tab. Nothing is sent to a server.
GUIDE
How to format CSS
What the output looks like
Each rule becomes a selector line ending with an opening brace, one declaration per line, and a closing brace on its own line. Rules inside at-rules such as media queries indent one level deeper, so the structure of the file is visible at a glance.
Comments are preserved
Comments in your stylesheet stay in place as their own lines, which keeps author notes, section markers, and license headers intact while the surrounding code is normalized.
Choose indentation per project
Two spaces dominates modern CSS; four spaces survives in older teams; tabs are a valid accessibility-friendly choice. The goal is consistency with the rest of the codebase, not personal taste.
Formatting does not validate
The formatter normalizes whitespace and line structure but does not check syntax. A missing semicolon or an unbalanced brace will still be there — but the one-rule-per-line layout usually makes such mistakes easy to find by eye.
HELP / FAQ
CSS formatter questions
Does it reorder or merge rules?
Never. Declarations keep their original order inside each rule, and rules keep their position in the file, because CSS cascade order is part of the meaning.
Will it handle minified one-line CSS?
Yes. A minified file is exactly the messy input this formatter is built for: it re-splits rules and declarations into readable lines.
What about at-rules like keyframes?
At-rules are formatted like regular blocks: the header line, indented declarations or nested rules, and a closing brace. Keyframe steps format as nested rules one level deeper.
Is my stylesheet uploaded?
No. Everything runs in this browser tab and the download is local.
EXPLORE BY CATEGORY · BFOTKIT
More tools like this
Pick a category to see every tool in it — then open one and discover related tools.