CODDY Tool

CSS Minifier

Compress CSS to its smallest safe form.

Strip comments, whitespace and redundant syntax from a stylesheet. Data URIs and content strings are preserved, which is where regex-based minifiers go wrong.

Everything you enter stays in this browser tab. Nothing is sent to our servers, logged or stored.

This is one of the thingsCSS Formatterdoes — open it for everything else it supports.

Loading tool…

What CSS Formatter supports

  • FormatConsistent indentation.
  • MinifySmallest safe output.

About CSS Minifier

Minifying removes everything a browser does not need in order to render your styles: comments, indentation, the newline between rules, the last semicolon in each block. None of it changes what the stylesheet does, and on hand-written CSS it commonly saves 20–40%.

The risk is not the removal, it is what a tool considers removable. Regex-based minifiers split on structural characters wherever they appear, which truncates any inline data URI at its first semicolon and mangles any content string containing a brace. Both failures produce output that looks fine and renders wrong.

This one parses the stylesheet before touching it, which is why both cases survive. It also shortens hex colours only when the digit pairs genuinely repeat, and strips units from zero lengths without touching time values or keyframe percentages — the two places that rule quietly breaks things.

How to minify CSS

  1. Paste your stylesheet

    Any size. It is parsed in this browser tab and never uploaded.

  2. Check the saving

    The statistics show the original and minified sizes, so you can see the real gain before copying.

  3. Copy or download

    Keep your formatted original as the source of truth — comments cannot be recovered from minified output.

Frequently asked questions

How much smaller will my file be?

Usually 20–40% for hand-written CSS. The tool reports the exact saving for your file, so you can decide whether it is worth it before copying anything.

Is minified CSS worth it when I already use gzip?

The extra benefit is smaller than the byte count implies, because compression already removes most repeated whitespace. It is still a genuine gain and costs nothing, so it remains standard practice.

Can I get my formatted CSS back?

Yes — switch to the Format tab and it is re-indented. Comments cannot be recovered, because minifying removes them entirely. Keep the original as your source of truth.

Why is my data URI intact here but broken elsewhere?

Because most minifiers split on semicolons with a regular expression, and a base64 data URI contains them. This parses the stylesheet properly and knows that a semicolon inside url() is not a separator.

All Developer Tools

CSS Minifier is free to use with no account, no watermark and no usage limits. Last updated 14 August 2026.