This tool minifies CSS to make your stylesheet smaller and faster to load, entirely in your browser. Paste your CSS and it removes everything the browser does not need — comments and redundant whitespace and punctuation — without changing how the styles render. It is handy for shrinking a stylesheet before deployment when you do not want to set up a build step.
How it works
The minifier walks through the source and applies these transformations while leaving string contents untouched:
- Strips
/* ... */comments. - Collapses runs of whitespace to a single space, then removes spaces around the structural punctuation
{ } : ; ,and combinators. - Drops the unnecessary semicolon before each closing brace.
Crucially, it copies the contents of quoted strings verbatim, so values inside url("...") and content properties are preserved exactly.
Example
This input:
/* Card */
.card {
display: flex;
padding: 12px;
color: #ffffff;
}
minifies to:
.card{display:flex;padding:12px;color:#ffffff}
The comment, indentation, line breaks and the trailing semicolon are all gone, but the rule behaves identically. It all runs in your browser, so nothing is uploaded.