CSS Formatter: Beautify and Indent CSS
Turn compressed CSS into readable code with one property per line.
- Works on your device. Nothing is uploaded.
- Free, no watermark
- No signup
How to use
- Paste CSS or open a .css file.
- Choose 2 spaces, 4 spaces or tab.
- Copy or download the formatted CSS.
Good to know
Each selector starts a block, each property goes on its own line and media queries are indented one level. Comments are kept. The tool uses js-beautify (MIT licence).
Use it to read a theme or library stylesheet that came minified, to review changes before committing, or to clean up CSS copied from browser developer tools.
It does not sort properties, remove duplicates or check for invalid values; the rules stay in the same order so the result looks the same in the browser. To make CSS smaller again, use the CSS minifier.
Questions
Does it change my CSS rules?
No. Only spaces and line breaks change.
Does it support SCSS or LESS?
Simple SCSS/LESS usually formats fine, but it is built for plain CSS.
Are comments kept?
Yes.
Can I format a big file?
Yes, files of a few MB work in a modern browser.
Is my CSS uploaded?
No. It is processed in your browser.