Paste minified or badly formatted CSS and get it back readable: one declaration per line, properly indented, with nested media and supports queries stepped in so the structure is visible at a glance. The formatter handles the detail that catches most beautifiers out — minified CSS drops the semicolon after the last declaration in a rule, so a naive formatter leaves the closing brace glued to it as 'margin: 0}'. Here the semicolon is restored and the brace gets its own line. Selector lists can be split one per line, indentation is configurable, and comments survive. There is a minify direction too, so you can go both ways. It all runs in your browser, so unreleased stylesheets stay on your machine.
| Input | Output |
|---|---|
| .a{color:red} | .a {\n color: red;\n} |
| .a{margin:0} | Semicolon restored before the closing brace |
| @media(...){.a{...}} | Contents indented one level inside the query |
| .a,.b{...} | Optionally one selector per line |
| font-family:a,b | Commas inside a value stay on one line |
| /* comment */ | Preserved, on its own line |
No. Only whitespace and line breaks change, plus a semicolon restored after a final declaration — which is optional in CSS and has no effect on rendering. Selectors, properties and values are untouched.
Yes. Brace depth is tracked, so the contents of a media or supports query indent one level inside it, and further nesting steps in again. That is what makes a long compiled stylesheet readable.
They are preserved and placed on their own line. Comments are stashed before the whitespace normalisation so their contents cannot be collapsed, which is how a formatter can otherwise mangle a licence header.
Partly. Plain nesting will indent correctly because it is brace-based, but preprocessor-specific syntax — mixins, variables with interpolation, control directives — is not understood and may not come out as you would want. Use your preprocessor's own formatter for source files.
They share the same engine. This page is focused on making CSS readable; the minifier is focused on making it small and adds compression levels, duplicate merging, batch files and analysis. Use whichever matches what you are actually doing.
No. Formatting happens in your browser. Unreleased stylesheets and proprietary design systems are never sent to a server, logged, or stored.
The stylesheet is normalised before it is rebuilt: comments are stashed so the whitespace collapse cannot touch them, all runs of whitespace become single spaces, and the spacing around braces, semicolons, colons and commas is stripped, giving a canonical form regardless of how the input was written. The formatter then walks that string character by character, tracking brace depth so nested at-rules such as media and supports queries indent their contents, and tracking whether it is inside a declaration value so a colon in a property separates the name from the value while a colon in a pseudo-selector does not. The closing brace is emitted on its own line, and a final declaration with no trailing semicolon has one added — minified CSS omits that semicolon, and without the fix the brace ends up glued to the declaration as 'margin: 0}'. Selector lists optionally break onto one line per selector. The same engine backs the Beautify tab of the CSS Minifier, so the two cannot drift apart.