CSS Minifier
Minify and compress CSS for production — strip whitespace, merge rules, and show size reduction instantly.
How to use CSS Minifier
-
Paste your CSS
Paste your CSS stylesheet or code into the input panel on the left.
-
Choose an optimisation level
Safe mode removes whitespace, comments, and redundant values without restructuring rules. Aggressive mode also merges compatible selectors and declarations for smaller output.
-
Click Minify
Click the Minify button to compress your CSS. The original size, minified size, and percentage reduction are shown below the output.
-
Copy or download the result
Click Copy to copy the minified CSS to your clipboard, ready to paste into your project or bundler.
CSS Minifier FAQ
What is the difference between safe and aggressive optimisation?
Does CSS minification affect performance?
Will this work with CSS variables and modern CSS?
Is my CSS sent to a server?
Can I use this in a CI/CD pipeline?
Does it support SCSS or Less?
Does minification remove my CSS comments?
Background
CSS Minifier compresses stylesheets for production deployment entirely in your browser. Choose safe minification when you want compact output without restructuring selectors and declarations, or switch to aggressive optimisation to allow rule merging and other structural transforms for the maximum possible reduction.
The results panel shows original file size, minified size, and the percentage saved. You can compare safe versus aggressive output instantly and copy the result directly into your build pipeline or deployed stylesheet.
Supports all modern CSS features: custom properties (variables), calc(), clamp(), CSS Grid, Flexbox, logical properties, modern selectors, and at-rules like @layer, @container, and @media. Ideal for integrating into build workflows before deploying to production — paste the output directly or copy it into your bundler configuration. All processing runs entirely in your browser with no code sent to any server.
Related tools
JavaScript Minifier
Minify JavaScript code with Terser — mangle variables, strip dead code, and show size reduction instantly.
SVG Optimizer
Optimize and compress SVG files with SVGO — remove metadata, comments, and redundant paths for 40–80% size reduction.
JSON Formatter
Format, validate, and minify JSON instantly — with configurable indentation, error location, and tree view.
Diff Checker
Compare two texts, code files, or documents side by side — word-level diff highlighting, private and browser-based.