CSS Formatter & Minifier

About this tool

Format beautifies CSS by putting each rule block on its own lines, indenting the declarations inside braces, placing a single declaration per line and adding a space after every colon and semicolon. Nested at-rules such as @media are indented as blocks too, so large stylesheets become easy to scan and diff.

Minify strips comments and every non-essential whitespace character, collapsing the stylesheet to the smallest single-line form that still parses. Both operations use a small hand-written scanner that tracks braces, strings and comments, so declaration values and quoted content are preserved exactly. Everything runs locally in your browser — nothing is uploaded.

Related tools

JS MinifierHTML FormatterJSON Formatter