CSS Minifier
Shrink CSS files instantly — strip comments and whitespace, keep every style intact.
Comments and whitespace are stripped; strings and URLs are preserved exactly.
Minified output
Working…
Something went wrong
Your results will appear here.
Fill in the input above and run the tool to get started.
Honest limits
This tool performs safe whitespace-and-comment minification only. It does not restructure rules, merge selectors, or remove unused CSS — for those deeper optimizations, use a build tool like Lightning CSS or cssnano.
How to use the CSS Minifier
- Paste your CSS into the input box.
- Press Minify CSS — the compact output appears with byte savings.
- Copy the result or download it, then replace the original stylesheet.
Examples
Example
Paste /* header */ .nav { color: blue; } → .nav{color:blue}. The comment and whitespace vanish; the rule is identical.
What this tool doesn't do
- Only whitespace and comments are removed — rules are never merged and unused CSS is never deleted.
- Quoted strings and URLs are preserved byte-for-byte, including intentional spaces.
- For deeper optimization (dead-code removal, selector merging), use a build tool like Lightning CSS.
Frequently asked questions
Related tools
HTML Minifier
Strip comments and collapse whitespace — safe for pre, textarea, and script tags.
Use toolJS Minifier
Trim JavaScript safely — remove comments and whitespace, keep every line working.
Use toolMeta Tag Generator
Generate SEO, Open Graph and Twitter Card tags.
Use toolOpen Graph Generator
Build perfect Open Graph and Twitter Card meta tags with a live social-share preview.
Use toolSlug Generator
Turn any title into a clean, SEO-friendly URL slug — lowercase, hyphenated, accent-free.
Use toolSERP Preview Tool
See exactly how your page appears in Google results — live preview with truncation warnings.
Use tool