CSS Minifier
Minify or beautify CSS code
How to use CSS Minifier
- Paste your CSS into the input panel.
- Choose Minify to strip whitespace and comments, or Beautify to add consistent formatting.
- In Beautify mode, select your indentation style (2 spaces, 4 spaces, or tabs).
- The stats bar shows the size reduction for minification.
- Copy or download the processed CSS.
What is CSS minification?
CSS minification is the process of removing unnecessary characters from CSS — whitespace, comments, and redundant semicolons — to reduce file size while preserving functionality. Smaller CSS files load faster, which improves page performance and user experience.
Beautification (also called prettification) is the opposite: it adds whitespace, line breaks, and indentation to make CSS easy to read and edit. Developers typically work with beautified CSS during development and serve minified CSS in production.
Most modern build tools (webpack, Vite, esbuild, PostCSS with cssnano) handle minification automatically. This tool is useful for quick one-off minification or beautification of CSS snippets you find online, export from a service, or paste from a colleague.