CSS formatter
Free online CSS formatter and minifier. Format and compress CSS code with customizable indentation.
How it works
- 1
Paste the CSS code
Copy the CSS rules (even an entire stylesheet) and paste them into the input field.
- 2
Choose Format or Minify
Click Format to indent properties and selectors with spaces after colons (e.g. color: red) or Minify to remove spaces, comments and empty lines.
- 3
Copy the transformed CSS
Check the statistics (size, savings percentage) and copy the result to the clipboard, ready to paste in your project.
FAQ
Does the formatter add spaces after colons?
Yes, it formats properties with space after colon (color: red) and separates selectors with empty lines for maximum readability.
Does minification break CSS?
No, minification only removes unnecessary spaces and comments. The resulting CSS is functionally identical to the original.
How much space is saved with minification?
Generally 20-40% depending on original formatting. Heavily commented files can save even more.