Skip to content
Kordu Tools Kordu Tools

CSS Minifier

Runs in browser

Minify 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.

Level:
Loading rating…

How to use

  1. 1

    Paste your CSS

    Paste your CSS stylesheet or code into the input panel on the left.

  2. 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. 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. 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?
Level 1 performs safe transforms: removing whitespace, comments, and simplifying values like 0px to 0. Level 2 is more aggressive: merging duplicate selectors, restructuring rules, and applying CSS shorthand properties. Level 2 produces smaller output but may occasionally change rendering in edge cases — always test it before shipping to production.
Does CSS minification affect performance?
Yes. Smaller CSS files parse faster, reduce bytes transferred, and improve Time to First Byte (TTFB) and render-blocking resource load times. Combined with gzip or Brotli compression on the server, minified CSS can be 60–80% smaller than the original.
Will this work with CSS variables and modern CSS?
Yes. CleanCSS supports CSS custom properties, calc(), clamp(), logical properties, CSS Grid, Flexbox, @layer, @container, and all standard CSS3+ features. It does not transform or polyfill modern syntax.
Is my CSS sent to a server?
No. All minification runs in your browser. Your stylesheets never leave your device and are not stored or logged.
Can I use this in a CI/CD pipeline?
This browser tool is intended for quick one-off minification. For automated build pipelines, use CleanCSS via its Node.js API or npm package, or integrate PostCSS with cssnano into your webpack, Vite, or Rollup build.
Does it support SCSS or Less?
No. This tool processes plain CSS only. Compile your SCSS or Less to CSS first using the Sass CLI or Less CLI, then paste the compiled output to minify it.
What is the estimated gzip size?
Gzip size shows roughly how large the minified file will be after gzip compression, which most web servers apply automatically. This is the actual byte count your users' browsers receive over the network.
Does minification remove my CSS comments?
Yes. Standard CSS comments are removed. Important annotations marked with /*! ... */ (using an exclamation mark) are preserved by CleanCSS — this convention is commonly used for licence headers.

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

Learn more