Something wrong with this tool?
About CSS Formatter Online
This tool beautifies minified or messy CSS into a well-indented, readable form. It places each declaration on its own line, normalises spacing around braces and colons, sorts properties (optional), and standardises whitespace and comment placement.
Useful when reading minified production CSS that one of your colleagues or a vendor wrote, when preparing CSS for code review, or when normalising styles before checking them into version control.
The formatter handles nested selectors, media queries, keyframes, custom properties, and modern features like CSS layers correctly. Sort-properties mode orders declarations alphabetically — useful for diff-friendly output but not always the most logical reading order.
How to use this tool
How to pretty-print minified or messy CSS
Paste the CSS
Drop minified or unevenly-indented CSS into the "CSS" field. The tool accepts whole stylesheets or fragments; comments, media queries, and nested at-rules pass through.
Press Run
Result is a single `formatted` field with one declaration per line, two-space indentation inside braces, and a blank line between top-level rules. Selectors stay on one line; very long ones won't wrap.
What it doesn't do
No vendor-prefix expansion, no shorthand → longhand transformation, no autoprefixing, no value rewriting. If your input is `margin:0 5px` the output will be `margin: 0 5px;`, not the four separate top/right/bottom/left properties.
When to re-minify
Format for human review, then run css-minifier-online before deploying. Round-trip safety holds for valid CSS — invalid input gets a best-effort pass and may not parse identically afterward.