How to format CSS
- Paste your CSS into CSS, for example a minified stylesheet copied from a live site.
- Keep Format selected and pick 2 or 4 spaces. Choose Minify instead to make it as small as possible.
- Copy the result or download it as a .css file.
What formatting does
- Puts each selector on its own line, followed by one property per line.
- Adds a space after each colon and a blank line between rules.
- Indents rules inside @media and other at-rules one level deeper.
- Leaves property order, values and comments as they are. It doesn’t add a missing final semicolon.
Formatting vs. minifying
Formatting is for people: readable CSS you can edit and review. Minifying is for browsers: the smallest file that does the same job. Keep the readable version as your source and minify a copy for production. The CSS minifier explains what minifying changes.