CSS Formatter
Turn compressed or messy CSS into readable rules, or minify a stylesheet for production. The minifier understands strings, comments and url() values, so it never breaks them.
Formatted CSS
How to format CSS
- Paste your CSS into the input editor.
- Choose Format or Minify, and the indentation for formatting.
- Check the warnings for unbalanced braces or unterminated strings.
- Copy the result or download it as a .css file.
Frequently asked questions
Does the minifier rewrite colours or merge rules?
No. It only removes comments and whitespace that browsers ignore, so the output behaves exactly like the input. Tools that restructure rules can save more bytes but occasionally change behaviour.
Does it support SCSS or Less?
Formatting usually works for SCSS and Less because their syntax is close to CSS, but the tool is designed for plain CSS.
Related tools
- HTML FormatterBeautify or minify HTML markup.
- JSON MinifierStrip whitespace from JSON and see the size saved.
- SQL FormatterFormat SQL for MySQL, PostgreSQL, SQLite and more.
More in Code & Data.