CSS Beautifier
Turn a minified stylesheet back into CSS you can read: one declaration per line, nested blocks indented, and every string, url() and number left exactly as it was.
How to Beautify CSS
Input Your CSS Code
Paste your minified or messy CSS code into the input box, upload a .css file, or click Sample to see how it works.
View Beautified CSS
About half a second after you stop typing, the output shows your CSS with one declaration per line and nested blocks indented, close to the layout most style guides use. Only whitespace changes. If you also want to sort properties, strip comments or pick your own indent, use the CSS Formatter instead.
Copy or Download
Copy the beautified CSS to your clipboard or download it as beautified.css.
Frequently Asked Questions
What does beautifying actually change?
Only the whitespace between pieces of CSS. Each rule gets its own block, each declaration its own line, nested rules and @media blocks are indented two spaces per level, and a space goes after the colon and after commas. Nothing inside quotes, url() paths, custom property values (--name: ...) or comments is touched, and numbers keep their spelling, so 14.50 stays 14.50.
Can I beautify minified CSS from a production build?
Yes, that is what it is mostly used for. Paste the one-line file from your build or from the browser and you get something you can read and search through. It will not bring back comments or class names a build step removed, though; if your bundler writes source maps, those point back to the original files.
Are my comments kept?
Yes. Every comment stays where it was. A comment that sits between rules or declarations gets a line of its own; one inside a value stays inline, so the CSS reads the same as before.
What happens if my CSS has a mistake in it?
A string, comment or url( that is never closed stops the beautifier, and you get the line and column where it starts. Other mistakes, like a missing brace or a misspelled property, are not checked; the CSS is laid out as written, so a wrong indent is often the first hint that a brace is missing.
Is my CSS uploaded anywhere?
No. The formatting runs in your browser and the stylesheet is never sent to a server. Copy and Download also work on what is in the input box right now.
Related Tools
CSS Minifier
Minify and compress CSS code
CSS Formatter
Format and organize CSS code
CSS Fixer
Fix broken CSS automatically, repair syntax errors, missing semicolons, and malformed styles
CSS Compressor
Compress and minify CSS code
CSS Autoprefixer
Automatically add vendor prefixes for cross-browser compatibility
CSS Validator
Validate CSS syntax and detect errors in your stylesheets