CSS Minifier & Beautifier
Minify CSS, or format minified CSS with indentation.
Minified
Examples
Questions
Why did "blue" become "#00f"?
The minifier writes each color in its shortest form. #00f is shorter than blue and looks the same.
Why do minify and beautify use different libraries?
Minifying has to understand CSS to rewrite it safely, for example removing units from zero values or merging rules. Beautifying only reprints it with indentation. Each library is loaded only when you use it.
What if I paste invalid CSS?
The minifier drops what it can't read, so invalid CSS often comes out empty. When that happens, the tool shows an error instead of empty output.
Can I get my original formatting back?
Not exactly, and comments are gone. Beautify turns minified CSS back into clean, indented code that works the same. Swap after minifying to see it.
Related tools
- SQL FormatterFormat SQL with consistent indentation and keyword case, for eight dialects.
- JSON Formatter & ValidatorFormat, minify, check and repair JSON, with errors shown by line and column.
- Whitespace CleanerRemove trailing spaces, mixed line endings and extra blank lines.
- JS Minifier & BeautifierMinify JavaScript with Terser, or format minified code with indentation.
- XML Formatter & ValidatorFormat, minify and check XML, with errors shown by line and column.
- HTML Formatter & MinifierIndent HTML so it reads well, or minify it without changing how it renders.