CSS Minifier Online
Minify CSS, JavaScript, HTML or JSON in the browser: strip comments and whitespace, see the size saved instantly.
Processed entirely in your browser — nothing you enter here is ever uploaded.
Result
About this tool
This page opens the code minifier with CSS preselected. Paste a stylesheet, press the button, and you get a single compact line: comments removed, whitespace collapsed around braces, colons, semicolons and commas, and the redundant last semicolon before every closing brace dropped.
CSS responds very well to minification because formatted stylesheets are mostly indentation and comments — typical savings run between 15% and 40% of file size. Smaller CSS means the browser starts rendering sooner, since stylesheets are render-blocking resources: every kilobyte trimmed from CSS shortens the time to first paint on slow connections.
The minifier is careful where it matters: strings in content properties and url() values are copied verbatim, and spaces around selector-level colons are kept so combinators like "a :hover" keep their meaning. The size panel shows bytes before and after plus the percentage saved, and the result can be copied or downloaded in one click.
Example. JavaScript const x = 1; /* note */ loses the comment and the extra spaces, and the panel shows the byte size before and after.
Limit. JavaScript names are not shortened; JSON must parse or it is rejected, and HTML leaves pre, textarea, script and style contents untouched.