DuckyTools
Home Developer CSS Minifier

CSS Minifier Developer

Strip comments and whitespace from CSS and see the saving.

CSS Minifier is a free online tool that strip comments and whitespace from CSS and see the saving. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.

Price
Free — no account, no quota, no watermark
Category
Developer
Where it runs
In your browser, on your device
Files uploaded
None
Technology
plain JavaScript
Settings
None — it just works
Works offline
Yes, after the first visit

About CSS Minifier

Comments go, whitespace collapses, the final semicolon in each block is dropped, and color values are shortened where an equivalent shorter form exists. What is deliberately not done is reordering or merging rules: CSS cascade order is semantic, and a minifier that merges selectors can silently change specificity and which rule wins. Safety is worth more than the extra few percent.

How to use it

  1. Paste the text you want to run through css minifier.
  2. There is nothing to configure — the result updates as you type.

Under the hood

Runs onplain JavaScript — runs the whole thing

Questions

Does it break CSS hacks?

Legacy hacks that rely on malformed syntax — the star hack, the underscore hack — may not survive, since they depend on parse errors. Modern feature queries and `@supports` are untouched.

Why not merge duplicate selectors?

Because order determines which declaration wins when specificity ties. Moving a rule can change rendering, and a minifier should never do that.