TOOLS · CSS MINIFIER
Shrink your CSS without breaking it.
Strips comments and unnecessary whitespace while staying careful about the spots that actually matter — descendant selectors and calc() expressions keep the spacing they need to still work.
Why Minify CSS?
A stylesheet written for humans to read has a lot of bytes that don't affect how anything renders — comments, indentation, and extra blank lines. Minifying strips all of that out, which shrinks the file the browser has to download and parse before it can paint your page.
It's a small win on its own, but it adds up across a whole site, especially on slower connections where every kilobyte affects how quickly a page becomes visible.
Why This Minifier Is Safe
The two classic ways a naive CSS minifier breaks things are stripping spacing out of calc() expressions (calc(100%-20px) is invalid CSS — it needs the spaces around the minus sign) and collapsing the space in a descendant selector like .card .title into .card.title, which is a completely different selector. This tool specifically protects both of those cases, along with content inside quoted strings.
Common Uses
- Shrinking a single stylesheet before deploying, without wiring up a full build pipeline.
- Cleaning up CSS copied from a design tool or another site before reusing it.
- Quickly checking how much smaller a stylesheet gets once whitespace and comments are removed.
Frequently Asked Questions
Will minifying ever change how my CSS renders?
No — this tool only removes comments and unnecessary whitespace. It doesn't rename classes, reorder rules, or touch selector logic, so the visual result should be identical before and after.
Should I minify CSS during development?
Generally no — keep readable, commented CSS while you're actively working on it, and minify only the version you ship to production, where file size matters more than readability.
Does this tool rename class names to shorten the file further?
No. Renaming classes requires also rewriting every HTML/JS reference to them, which is a much riskier transformation — this tool sticks to purely safe whitespace and comment removal.