CSS Minifier
Runs in browserMinify and compress CSS for production — strip whitespace, merge rules, and show size reduction instantly.
Last updated 01 Apr 2026
Minify CSS stylesheets using CleanCSS with level 1 (safe) or level 2 (aggressive) optimisation. Removes whitespace, comments, redundant values, and merges duplicate rules. Shows original size, minified size, percentage reduction, and estimated gzip size. Free, browser-based, no code uploaded to any server.
How to use
- 1
Paste your CSS
Paste your CSS stylesheet or code into the input panel on the left.
- 2
Choose an optimisation level
Level 1 is safe for all CSS and covers whitespace, comments, and value simplification. Level 2 applies aggressive rule merging and shorthand transformations — test the output before deploying.
- 3
Click Minify
Click the Minify button to compress your CSS. The original size, minified size, percentage reduction, and estimated gzip size are shown below the output.
- 4
Copy or download the result
Click Copy to copy the minified CSS to your clipboard, ready to paste into your project or bundler.
Frequently asked questions
What is the difference between level 1 and level 2 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?
What is the estimated gzip size?
Does minification remove my CSS comments?
CSS Minifier compresses stylesheets for production deployment using CleanCSS, one of
the most capable CSS processors available. Choose level 1 for safe minification that
removes whitespace, comments, and simplifies values — or level 2 for aggressive
optimisation that merges duplicate selectors, restructures rules, and applies CSS
shorthand transformations for the maximum possible reduction.
The results panel shows original file size, minified size, and the percentage saved.
An estimated gzip size is also displayed so you can understand the actual transfer
size on a compressed server.
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.