CSS Minifier Online
Minify CSS code instantly in your browser — remove whitespace and comments
Input CSS
How to minify CSS online
Paste your CSS, hit Minify, copy the output. The tool strips whitespace, comments, and redundant characters — the browser never needed any of that, so removing it has zero effect on how your styles render. You just get a smaller file.
What minification actually removes from your CSS
Whitespace and newlines — the browser parser doesn't care about indentation or line breaks. Comments — stripped completely in production builds. Redundant semicolons before closing braces. Unnecessary quotes around property values that don't need them.
A typical stylesheet shrinks 20—50% from this alone. For a 200KB stylesheet, that's 40—100KB saved on every page load — meaningful on mobile connections and for Core Web Vitals scores.
This tool doesn't change your actual CSS logic. It can't break your layout. If your CSS was valid before, it's valid after — just smaller.
When to minify vs when not to
Minify for production — anything that ships to users should be minified. Keep the unminified source in your repository for development. If you're using a build tool (Webpack, Vite, Parcel), it should be doing this automatically as part of your build process. Use this tool for quick one-off compression, legacy files, or when you don't have a build pipeline set up.
Complete Developer Toolkit
CSS minification is most effective as part of a full front-end build optimization. Pair it with our JS minifier to compress both your stylesheets and scripts in the same pass — together they reduce total page weight significantly. Our CSS glassmorphism generator creates modern CSS effects that you can paste directly into your stylesheet before minifying. For validating the HTML that your CSS styles, our HTML to Markdown converter and Markdown preview help you keep your markup clean and semantic.
When working on a full web project, our JSON formatter cleans up your API data files, our URL encoder handles string encoding for dynamic CSS background URLs, and our Base64 encoder converts fonts or small images to inline data URIs for embedding directly in CSS. Our diff checker lets you compare your original CSS against the minified output to verify nothing was dropped. For debugging the web performance impact of your CSS, our Core Web Vitals guide explains which CSS patterns hurt LCP, CLS, and FID scores. The SVG path visualizer is useful when working with inline SVG shapes referenced in your CSS.
How to Use This Tool
- 1 Paste your CSS into the Input field.
- 2 Click Minify CSS.
- 3 The minified output appears with the size reduction shown.
- 4 Click Copy to Clipboard — paste it into your project.