CSS Minifier
Paste CSS and get a smaller file that works exactly the same, with the size saving shown.
- Free & unlimited
- No sign-up
- Instant results
How to use CSS Minifier
- Paste your CSS or open a file.
- The minified code appears straight away, with the size before and after.
- Copy it or download the file.
What gets removed
- Comments (keep /*! license */ comments with the option).
- Spaces, tabs and line breaks that browsers don't need.
- The last semicolon in each rule, and empty rules.
- Units after zero (
0px→0), leading zeros (0.5→.5) and long colours (#ffffff→#fff).
Safe by design
Strings, url() values and calc() expressions are left untouched, spaces that matter (like a :hover) are kept, and selectors are never rewritten. The result looks exactly the same in the browser.
Why minify
Smaller files download faster, especially on mobile data, which helps page speed scores like Core Web Vitals. Keep your original, readable file for editing and publish the minified copy.
Frequently asked questions
Is my code uploaded?
No. Everything runs in your browser.
Can I undo the minification?
Use the Code Beautifier to make minified code readable again (comments can't be brought back).
Will it break my code?
No. It only removes characters browsers ignore and never rewrites selectors or strings.
Is there a size limit?
No fixed limit; very large files just take a moment longer.
Related tools
JavaScript Minifier
Shrink JavaScript safely with a real parser.
HTML Minifier
Shrink HTML, including inline CSS and JS.
Code Beautifier
Format HTML, CSS, JavaScript, JSON, YAML and Markdown.
Color Converter
Convert HEX, RGB, HSL, HSV and CMYK colours.
More Developer Tools
JSON Formatter & Validator
Format, validate and minify JSON with clear error messages.
JSON to CSV Converter
Convert a JSON array to CSV for Excel or Google Sheets.
CSV to JSON Converter
Convert CSV or Excel data into a JSON array.
Base64 Encode & Decode
Encode text to Base64 or decode Base64, UTF-8 safe.
URL Encode & Decode
Percent-encode or decode URLs and split them into parts.
UUID Generator
Generate random v4 or time-ordered v7 UUIDs in bulk.
JWT Decoder
Decode a JSON Web Token and check when it expires.
Hash Generator
MD5, SHA-1, SHA-256 and SHA-512 hashes for text or files.