CSS Formatter
Your code never leaves your browser — everything runs on your device.
Paste minified or messy CSS and get clean, readable code with consistent indentation — or flip the switch and minify it for production instead. Comments and strings are kept intact, media queries stay nested correctly, and the minifier strips comments and whitespace (including turning 0px into 0). This page also covers the CSS minifier: one tool, both directions. Free, no signup, and your code never leaves your browser.
Frequently asked questions
How do I format CSS?
Paste your CSS and click Format CSS. Rules are split onto their own lines, declarations are indented, and media queries are nested — pick 2 or 4 spaces for the indentation.
What is the difference between formatting and minifying?
Formatting adds line breaks and indentation so CSS is easy to read and edit. Minifying removes comments and all unnecessary whitespace so the file is as small as possible for production. Use formatted CSS while you work, minified CSS when you ship.
Will the minifier break my CSS?
No. It only removes comments and whitespace and shortens zero values (0px becomes 0). Selectors, values, and strings are left exactly as they are.
Is my CSS uploaded anywhere?
No. Formatting and minifying happen entirely in your browser. Your code is never sent to a server, stored, or shared.