CSS Minifier — Compress & Beautify
Minify your CSS code to reduce file size. Remove comments, whitespace, and unnecessary characters.
Minifying CSS strips comments, whitespace, and the final semicolon to produce the smallest possible stylesheet — fewer bytes means faster page loads. This tool also beautifies: expanding minified CSS back into readable, indented form for debugging.
How to minify CSS
- Paste your CSS into the input box.
- Click Minify to compress it — the tool reports the size saving.
- Click Beautify to expand minified CSS back into readable form.
- Copy the result with one click.
Minification example
Newlines and indentation gone, the trailing semicolon dropped. Individually tiny savings; across a real stylesheet they add up to measurably faster downloads — especially on mobile connections.
.card {
color: #333333;
margin: 0 auto;
} → .card{color:#333;margin:0 auto}Frequently asked questions
How much smaller will my CSS get?
Typically 20–40% for hand-written CSS — more if it’s comment-heavy, less if it was already written compactly.
Is minified CSS safe to edit?
Don’t. Keep the readable source, minify as a build/deploy step, and use Beautify here only to inspect minified output temporarily.
Does it rename classes like big build tools?
No — this minifier is lossless: it only removes whitespace and comments, never changing selectors or property names.