CSS Minifier
Minify and compress CSS by stripping comments and collapsing whitespace, while preserving string contents and url() values, with a byte-savings summary.
ToolsSoup's CSS Minifier is a free online tool that compresses your stylesheet to the smallest possible size right in your browser. It strips out comments, collapses runs of spaces, tabs, and line breaks, removes the gaps around braces, colons, semicolons, and combinators, and drops the redundant final semicolon in each rule — then shows exactly how many bytes you saved. String contents and url() values are left untouched so nothing breaks. Nothing is uploaded, so even private styles stay on your own device.
What is a CSS minifier?
A CSS minifier compresses a stylesheet by removing everything a browser does not need to apply it: indentation, blank lines, comments, the spaces around braces and colons, and the unnecessary semicolon before each closing brace. The result is CSS that is functionally identical to the original but takes up far fewer bytes. It is the opposite of a CSS beautifier — instead of spreading rules across many readable, indented lines, it squeezes them onto a single compact line for faster downloads and smaller files.
How to minify CSS online
Compressing CSS with ToolsSoup takes just a couple of clicks:
- Paste your CSS into the input box on the left.
- Click Minify to strip comments and collapse whitespace inside your rules and selectors.
- Check the savings summary to see the original size, minified size, and how many bytes you saved.
- Copy the compact result with one click and drop it straight into your page or build output.
What does the CSS minifier preserve?
The minifier is careful to only remove characters that do not change how your styles apply. The text inside quoted strings — such as content values and font names — keeps its exact spacing, and url() values are passed through untouched, so paths with spaces still resolve. Combinators are only trimmed where it is safe, and the spacing inside calc() expressions is kept so your math still works. Everything else — comments, indentation, redundant semicolons, and the gaps around braces, colons, and commas — is compressed away.
Why minify CSS?
Smaller CSS downloads faster, which improves page-load time and Core Web Vitals, and it lowers bandwidth for both you and your visitors. Stripping comments before deploying keeps internal notes out of production. Minified CSS is also handy to inline inside a style tag, an email template, or a generated document where extra whitespace would only add weight.
Why use this CSS minifier?
- 100% free with no ads, sign-up, or usage limits.
- Runs entirely in your browser — your styles are never uploaded to a server.
- Removes comments and collapses all extra whitespace in one click.
- Preserves string contents and url() values byte-for-byte.
- Keeps calc() spacing intact so your expressions stay valid.
- Shows byte savings so you can see how much smaller the file got.
- Works offline once the page has loaded.
Frequently asked questions
Is this CSS minifier free?
Yes. Every tool on ToolsSoup is completely free to use, with no account, sign-up, or hidden limits.
Is my CSS safe?
Absolutely. All minifying happens locally in your browser using JavaScript, so your styles are never sent to or stored on any server.
Will minifying break my styles?
No. The minifier only removes whitespace and characters that browsers ignore. Quoted strings and url() values are preserved exactly, and the spacing inside calc() expressions is kept, so your styles apply the same.
Does it remove CSS comments?
Yes. CSS comments written as /* … */ are stripped to save bytes, since browsers do not need them to apply your styles.
Does it touch the contents of url() or strings?
No. Values inside url() and quoted strings — including any spaces they contain — are passed through unchanged, so font names, content values, and image paths still work.
How much smaller will my CSS get?
It depends on how much indentation and how many comments the original has. Heavily formatted, commented stylesheets can shrink noticeably. After each minify, the tool reports the original size, the new size, and the exact number of bytes saved.