CSS Minifier
Minify CSS in your browser: strip comments, line breaks and spaces around braces, colons and semicolons, and see how many bytes you saved.
Minify CSS in your browser: strip comments, line breaks and spaces around braces, colons and semicolons, and see how many bytes you saved.
About this tool
This CSS minifier shrinks a stylesheet by removing everything the browser ignores. Paste your CSS and the minified version appears at once, with the original and new size in bytes and the percentage saved. It removes all /* … */ comments, joins the whole stylesheet onto one line, collapses runs of spaces, tabs and line breaks into nothing or a single space, removes the spaces around { } : ; and commas, and drops the last semicolon before each closing brace, which is allowed by the CSS rules. So “.button { color: #fff; padding: 8px 16px; }” becomes “.button{color:#fff;padding:8px 16px}”. Values with spaces that matter, such as margin: 0 auto or calc(100% - 2rem), keep the single spaces they need. On a well-commented, indented stylesheet this typically saves 15 to 35 percent before gzip. That is useful for inline style blocks in emails and landing pages, CSS pasted into a WordPress Customizer or theme field, small sites without a build step, and checking how much a stylesheet would shrink. It runs entirely in your browser, so your code is not uploaded. It is a whitespace-and-comment minifier: it does not merge duplicate rules, shorten colours (#ffffff to #fff) or remove unused selectors, which full build tools like cssnano or Lightning CSS do. Two cases need a quick check. A space before a colon in a selector is meaningful — “.menu :hover” means any hovered element inside .menu, while “.menu:hover” means the menu itself — and the minifier removes that space, so write such selectors as “.menu *:hover”. Spaces after commas or colons inside quoted strings, for example in content: “a: b”, are removed too. Keep an unminified copy as your source file and edit that, not the minified one.

A full stylesheet or a few rules.
Comments and whitespace are removed instantly.
Bytes before and after, and the percent saved.
Paste into your site, email or theme field.
Minified CSS appears as you paste.
Every /* … */ block is dropped.
No spaces around braces, colons, semicolons or commas.
The optional final ; before } is removed.
See exactly how many bytes you saved.
Runs in your browser; your code is not uploaded.
No build step needed
Every byte counts toward Gmail’s clipping limit.
ExampleMinify the newsletter’s embedded CSS before sending.
Customizer and theme fields hold pasted CSS.
ExamplePaste a minified copy, keep the readable one in your notes.
Hand-made sites often have no bundler.
ExampleMinify style.css before uploading by FTP.
Critical CSS in the page head should be tiny.
ExampleMinify above-the-fold rules before inlining them.
Lighthouse flags unminified CSS.
ExampleCheck how much a flagged stylesheet would shrink.
Compact CSS for a widget or embed code.
ExampleMinify the style block of an embeddable badge.
Small, and still correct
“.menu :hover” and “.menu:hover” mean different things, and the space is removed. Write “.menu *:hover” instead.
Edit your readable file and minify again. Never edit the minified copy.
Spaces after : , ; inside content: "…" strings are removed too. Check pseudo-element text after minifying.
Minify plus gzip or Brotli on the server gives the smallest download.
Senior Software Engineer · Developer of Toolyconvert
Hemant developed CSS Minifier and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.
Last updated 24 November 2026
Featured on
Toolyconvert is listed on these product directories and launch platforms.