CSS Minifier
Paste a stylesheet and get it back compressed. The counter under the box shows the size before and after, so you can see whether it was worth it.
The code never leaves this page: formatting happens in your browser.
- Free
- Files never leave your device
- No sign-up
- No file limit
How to use
- Paste the CSS into the first box — it is minified as you type.
- Compare the sizes shown below the input.
- Copy the result, or press «Format» to read it again.
Good to know
What gets removed
Comments, line breaks, indentation, the spaces around colons and combinators, and the final semicolon before each closing brace, which the standard never required. Selectors keep the single space that separates a descendant from its ancestor, because removing it changes what the rule matches.
Why strings are not touched
A semicolon inside content: "a;b" and a brace inside an inline SVG data URI both look like structure to a regular expression. Minifiers that work by pattern-matching break such files silently, and the damage shows up as a missing icon in production. This one reads the stylesheet character by character and carries quoted strings across whole.
Frequently asked questions
Does the stylesheet still work exactly the same?
Yes. Nothing is renamed, reordered or dropped — only whitespace and comments go, and neither affects how a rule is applied.
How much smaller will my file get?
A hand-written stylesheet usually loses twenty to thirty percent. After gzip the difference is much smaller, since compression already deals with repeated whitespace.
Is my code sent to a server?
No. The entire process runs on the page, which matters for stylesheets that are not public yet.
Can I read it again afterwards?
Press «Format» and the stylesheet is laid out with one declaration per line. The original comments are gone, but the rules are all there.
Related tools
- CSS Formatter Paste a stylesheet — even one that arrived as a single line — and read it again. Each declarati…
- HTML Minifier Paste HTML and get it back without the whitespace nobody sees. The counter under the box shows…
- JSON Minify Paste JSON and get it back without a single wasted byte: no indentation, no line breaks, same d…
- JSON Formatter and Validator Paste JSON and get it formatted, validated or minified. The data stays in your browser — nothin…
- Base64 Encode and Decode Paste text to get Base64, or paste Base64 to get the text back. Cyrillic, Chinese and emoji all…
- Word Counter Type or paste your text and the counters update instantly — words, characters, sentences, parag…
- Case Converter Paste text, pick a case, get the result. Nine ways of writing the same words: the four everyday…
- CSV to JSON Paste a table, get JSON. The parser follows RFC 4180, so a cell like «Doe, John» stays one fiel…