Something wrong with this tool?
About CSS Minifier Online
This tool minifies CSS by removing unnecessary whitespace, comments, and redundant syntax. The output is functionally identical to the input but significantly smaller — often 30-50% reduction in file size — which means faster page loads and lower bandwidth costs.
Common minification operations include stripping whitespace, removing comments, shortening hex colors (#FFFFFF → #FFF), collapsing multiple selectors that share the same declarations, and removing zero units (0px → 0).
Run the minifier on your styles before deploying to production. The output is preserved exactly when parsed by browsers — only the human-readable formatting is gone. Source maps can map the minified version back to the original for debugging.
How to use this tool
How to compress a CSS stylesheet for production
Paste the CSS
Drop the full stylesheet (or just a block) into the "CSS" field. Comments, newlines, and indentation are removed. Strings and url() literals stay intact.
Press Run
Result returns a single `minified` field plus a `savedPercent` showing how much smaller the output is than the input. Typical savings: 20-40% on hand-written CSS, less on already-optimised frameworks.
What gets removed
Block (`/* … */`) and any unsafe whitespace (around `{ } : ; ,`). Trailing semicolons before `}` are kept (safer for some legacy parsers) or stripped depending on the minifier — peek at the output if exact bytes matter.
Caveats
Doesn't merge duplicate selectors, doesn't shorten colour names (`#ffffff` stays `#ffffff` rather than becoming `#fff`), doesn't reorder declarations. For more aggressive minification use a dedicated tool like csso or lightningcss in your build.