CSS Minifier & Formatter

Minify CSS by removing comments and whitespace to reduce file size, or format minified CSS back into readable code. Shows percentage size reduction.

paste CSS to minify or format
Mode
CSS Input
Output (click to copy)

Frequently Asked Questions

Why minify CSS?
Minified CSS loads faster because it's smaller — removing whitespace, comments, and redundant characters reduces file size by 20–50%. Every kilobyte saved improves page load speed, which affects both user experience and Google rankings.
Does minification change how CSS works?
No. Minification only removes characters that the browser ignores anyway — whitespace (spaces, newlines, tabs) and comments. The visual output of minified CSS is identical to the original.
When should I format CSS?
Format CSS when you receive minified code and need to read or edit it, when reviewing CSS from a third-party library, or when you want to standardise indentation in a project. Formatted CSS is human-readable but not suitable for production.
Should I minify CSS in development?
No — keep readable CSS during development. Minify only for production. Most build tools (Webpack, Vite, Parcel) handle minification automatically as part of the build process. Manual minification is useful for quick testing or simple projects without build tools.