CSS Minifier
NEWMinify CSS with csso: remove whitespace and comments, merge rules, and see the size saved before you copy it.
Runs 100% in your browser — your input is never uploaded or stored on our servers.
@import rules and url() references are never fetched or inlined, only tidied. An @import placed after other rules is invalid CSS and is dropped by the minifier, so keep imports at the top.
Quick Examples
Typical inputs and the results this tool produces.
Overview
This CSS minifier compresses stylesheets with csso. It strips whitespace and comments, shortens colors and numbers, and merges duplicate selectors and declarations, so the file is smaller and loads faster without changing how the page looks.
Front-end developers use it to shrink a stylesheet or a snippet before deploying, or to check how much a CSS minify step would save. Decide whether to restructure rules, and keep legal /*! comments, only the first one, or none. Parse problems are listed with their line and column.
Processing happens entirely in your browser. Nothing is uploaded, and you get the original and minified size, percent saved and a gzip estimate as soon as it finishes.
Why use this tool?
- Smaller CSS with csso structural optimization
- Keep license comments or remove them all
- Shows size, gzip and rule count savings
- Reports invalid CSS with line and column
- Private: styles never leave your browser
Features
Whitespace and comments
Removes spaces, line breaks and comments while keeping the styles identical.
Rule restructuring
Merges duplicate selectors and declarations, with an option to turn it off.
Legal comments
Keep every /*! comment, only the first, or remove all comments.
Shorter values
Turns #ff0000 into red, 0px into 0 and 0.50em into .5em.
Size report
Original and minified bytes, percent saved, gzip estimate and rule and declaration counts.
Upload and download
Drop a .css file in, then copy the result or download it as .min.css.
How to Use
Add your CSS
Paste a stylesheet into the CSS input box, drop a .css file onto it, or press Sample.
Choose options
Keep Restructure rules ticked for the smallest output and pick how Comments are handled.
Minify
Press Minify, or leave Minify as I type on. Review the size saved and any parse issues.
Copy or download
Press Copy or Download .min.css and use it in production.