Minify CSS — strip comments, whitespace, shorten colors, merge selectors. 30-60% smaller.
- Runs locally
- Category Format Converter
- Best for Turning pasted content or local files into a handoff-friendly format.
Minified output appears here.What this tool does
Free online CSS minifier and compressor. Paste raw CSS and get a production-tight single-line output, typically 30-60% smaller than the input. Every optimization is a toggle you can disable: strip comments (but keep /*! important banners */), collapse whitespace, shorten hex colors (#ffffff → #fff), convert rgb()/rgba() to hex when fully opaque, drop the `px` on zero values (0px → 0), trim the leading zero on decimals (0.5 → .5), collapse identical 4-value margin/padding shorthand (margin: 5px 5px 5px 5px → margin: 5px), and drop the redundant trailing semicolon at the end of every block. The brace-aware tokenizer is the same one shipping in our CSS formatter, so urls, strings, calc(), @media, @keyframes, and nested rules all round-trip cleanly. Live size diff (before / after / saved %) prints under the output. 100% client-side — your design tokens, internal theme files, and unreleased vendor CSS never leave the tab. Need pretty-printed CSS back instead? Use our CSS Formatter — they share the same parser so you can round-trip without churn.
Tool details
- Input
- Files + Text + Structured content
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Download
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- No account required
- Open the page and use it; whether results survive refresh depends on the tool.
- Performance budget
- Initial JS <= 14 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Format Converter · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How CSS Minifier fits into your work
Use it when the main problem is getting content from one practical format into another.
Conversion jobs
- Turning pasted content or local files into a handoff-friendly format.
- Previewing a conversion before you use it in a larger workflow.
- Cleaning small format mismatches without opening a full editor.
Conversion checks
- Try a small sample first when the source format is messy.
- Check character encoding, separators, and line endings after conversion.
- Keep the source until the converted output has been reviewed.
Good next steps
These links move the current task into a more complete workflow.
- 1 JS Minifier Minify JavaScript — strip comments, whitespace, optional name shortening. 40-70% smaller. Open
- 2 HTML Minifier Minify HTML — strip comments, whitespace, optional attributes, inline CSS/JS. 40-60% smaller. Open
- 3 CSS Formatter & Minifier Format and beautify CSS — sort properties, indent rules, expand or minify. Open
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Age Difference Calculator The exact gap between two birthdays — years/months/days, percentage, and the date one person is twice the other's age — browser-only
- AI Eval Planner Generate eval cases, pass criteria, and edge cases from an AI feature, risks, and user path.