TextArray
100% local

CSS minifier

Minify CSS by stripping comments and whitespace without touching your values.

Input
Output

CSS minifier

Paste a stylesheet and this tool returns a compact version with comments stripped, whitespace collapsed and the last semicolon of every block removed. Use it to shave bytes off a stylesheet before shipping, to inline critical CSS into a page head, to squeeze styles into an HTML email template, or simply to see how much of your file is formatting — the tally under the output shows the byte counts and the percentage saved.

The minifier parses your CSS instead of blindly replacing text, so the tricky parts stay intact: string literals keep every character, calc() expressions keep the spaces around their operators, url() values are copied through untouched, and a descendant selector like "a :hover" is never fused into "a:hover". What it deliberately does not do is rewrite your values — colors, units and shorthands come out exactly as you wrote them. It is an honest whitespace-and-comments minifier, not an optimizer that restructures rules.

Two options tune the output. "Keep /*! comments" preserves comments that start with /*!, the convention for license banners that must survive minification — turn it off to drop them like any other comment. "One rule per line" emits a newline after each top-level rule, which keeps the result diff-friendly and easier to scan than one long line.

Everything runs in your browser. Your CSS is never uploaded, so proprietary stylesheets and unreleased designs stay on your device.

FAQ

Does it rewrite colors, units or shorthand properties?
No. It only removes comments, unneeded whitespace and the last semicolon of each block. Values, selectors and property order come out exactly as written — it does not restructure or optimize rules the way a build-tool minifier might.
Will tricky values like calc() or url() break?
No. The tool parses the CSS, so string literals are preserved character for character, calc() keeps the required spaces around its operators and everything inside url() is copied through untouched.
What are /*! comments and why keep them?
A comment starting with /*! is the convention for license banners that must survive minification. "Keep /*! comments" is on by default; turn it off to strip them like any other comment.
Is my CSS uploaded anywhere?
No. Minification runs entirely in your browser and your stylesheet never leaves your device.