CSS Minifier Online
Minify and compress CSS by removing comments and whitespace, then see exactly how many bytes you saved. Free, private and runs entirely in your browser. Speed up your site and improve Core Web Vitals.
- Remove comments
- Collapse whitespace
- Live size report
- Copy & download
Last updated:
- Runs in your browser
- No upload
- No sign-up
- 100% Private
- Live size report
- Works on mobile
What is the ToolDeck CSS Minifier?
ToolDeck CSS Minifier is a free online CSS minifier that works inside your web browser. It removes comments, whitespace and line breaks from your stylesheet to reduce file size, shows the bytes saved and a Gzip estimate, and lets you copy or download the minified .css file. Your code is processed on your own device, so nothing is uploaded and no account is needed.
- Price
- Free, no premium tier
- Account required
- No
- Code uploaded to a server
- No, minification runs locally in your browser
- What it removes
- Comments, extra whitespace, tabs and line breaks
- What it does not do
- Compile SCSS or LESS, merge rules, or rename classes
- Output
- Minified CSS with size report and Gzip estimate
- Export options
- Copy to clipboard or download as .css
- Works on
- Chrome, Edge, Firefox, Safari, iOS and Android browsers
How to minify CSS online in 3 steps
- 1
Paste your CSS
Paste your raw, unminified CSS code into the left text box. The tool works entirely in your browser.
- 2
Choose options
Toggle options like removing comments or collapsing whitespace to get the exact output you need.
- 3
Copy or Download
Click Copy to grab the minified CSS, or download it directly as a .css file for production.
CSS minification example: before and after
The minifier removes comments, indentation and line breaks. The styles behave exactly the same, but the file is smaller.
Before (readable CSS)
/* Button styles */
.btn {
color: #ffffff;
padding: 8px 16px;
margin: 0;
}After (minified CSS)
.btn{color:#ffffff;padding:8px 16px;margin:0}CSS minifier FAQ: questions people ask
Quick answers about minifying CSS, PageSpeed, Gzip, cssnano, privacy and safety.
What is CSS minification?
CSS minification is the process of removing unnecessary characters from your stylesheet without changing how it works. This includes whitespace, line breaks, comments, and the last semicolon in a block.
How do I minify CSS online for free?
Paste your CSS into the ToolDeck CSS Minifier above, choose whether to remove comments and collapse whitespace, then copy the result or download it as a .css file. It is free, needs no account and nothing is uploaded.
Why is minifying CSS important for SEO and PageSpeed?
Smaller CSS files download and parse faster, which can improve metrics like First Contentful Paint and Largest Contentful Paint, and Lighthouse or PageSpeed Insights results. Page experience is one of many ranking signals, so minifying helps performance but does not guarantee a higher ranking.
Is this CSS minifier safe and private?
Yes. The tool runs entirely in your browser. Your code is never sent to a server, so it is safe for proprietary or sensitive stylesheets. You can check the browser network tab to confirm.
Will minification break my website?
A basic minifier like this one only removes spaces and comments. It does not change selectors, variable names or CSS logic. Still, always keep a copy of your original unminified code in your repository.
What is the difference between minification and Gzip compression?
Minification removes characters from the file itself. Gzip or Brotli compresses the file for transfer over the network. Use both for the best results. This tool shows a Gzip estimate so you can see the combined effect.
How much file size can I save by minifying CSS?
It depends on how many comments and how much indentation your stylesheet has. Heavily commented, well-indented files shrink the most. The live size report shows the exact bytes and percentage saved for your file.
What is the difference between this tool and cssnano or clean-css?
cssnano and clean-css parse your CSS and can merge rules, shorten values and restructure code for smaller output, but they need a build step. This tool is a quick, safe, no-install option that removes comments and whitespace only.
Does minifying CSS help with render-blocking warnings?
Partly. Minifying makes the stylesheet smaller so it downloads sooner, but a CSS file is still render-blocking. To fix that warning you also need techniques like inlining critical CSS and loading the rest asynchronously.
Can I use this for SCSS, SASS or LESS?
No, this tool is for plain CSS only. SCSS, SASS and LESS must be compiled to CSS first. Once compiled, paste the output here.
Does it keep CSS variables and modern CSS?
Yes. CSS custom properties (--name), media queries, grid, flexbox, nesting and other modern syntax stay intact. It only removes whitespace and comments.
Can I minify inline CSS or a style tag?
Yes. Paste the contents of a style tag or an inline style block here to compress it.
How do I minify CSS for WordPress?
Paste your custom theme or Additional CSS code here, copy the minified output, and paste it back or upload the .css file to your theme. Keep the original copy for future edits.
What happens if I minify an already minified file?
It will save very little or nothing, since the file is already compact. The tool still processes it without problems.
Can I undo minification?
Not fully. A CSS beautifier can restore indentation and line breaks, but removed comments cannot be recovered. Always keep your source files.
Is there a file size limit?
There is no hard limit. The tool uses your browser memory, so it handles large files, though very large stylesheets may take a moment to process.
Does it work on mobile?
Yes. This browser-based tool works on Safari for iOS and Chrome for Android. You can paste and copy code directly on your phone.
Is this tool free and do I need to install anything?
It is completely free with no limits, sign-ups or premium tiers, and nothing to install. It runs in your browser.
Everything you get for free
One-click Minification
Instantly remove all unnecessary whitespace, line breaks, and comments from your CSS file with a single click.
Live Size Report
See exactly how many bytes you saved and what percentage of the original file size was reduced.
Gzip Estimate
Get an estimate of what your file size will be after Gzip compression, which is what most servers use.
Remove Comments
Strip out all /* ... */ comments. Perfect for production environments where code readability does not matter.
Collapse Whitespace
Remove every unnecessary space, tab, and newline character, reducing your CSS to its absolute minimum size.
Copy to Clipboard
Instantly copy the minified CSS to your clipboard for easy pasting into your code editor or build pipeline.
Download as .css
Download your minified code directly as a .css file, ready to upload to your web server.
Privacy First
All processing happens locally. Your proprietary code never leaves your computer, making it 100% safe.
What people use it for
Web Developers
Quickly minify CSS before pushing to production. Reduce page weight and improve loading times for your users.
WordPress Users
Minify custom CSS added to your theme or child theme to ensure your site loads as fast as possible.
E-commerce Stores
Every kilobyte counts for conversion rates. Minify your store CSS to keep bounce rates low and sales high.
PageSpeed Optimization
Improve your Google Lighthouse scores by reducing the time it takes for the browser to download and parse CSS.
Email Templates
Minify inline CSS in HTML email templates to help keep them under Gmail size limits and avoid clipped messages.
Learning & Teaching
Show students the difference between readable, commented CSS and the compressed code that actually ships to browsers.
ToolDeck vs build tools and other online CSS minifiers
Many online minifiers upload your code to a server. This one runs locally in your browser. Build tools like cssnano go further with rule merging, but need installation and configuration.
| Feature | TToolDeck | Build tools (cssnano, clean-css) | Typical online tools |
|---|---|---|---|
| Runs entirely in your browser | Yes | No | No |
| Code never sent to a server | Yes | Yes | No |
| No sign-up or account | Yes | Yes | No |
| Removes comments and whitespace | Yes | Yes | Yes |
| Live size report | Yes | Partial | No |
| Gzip estimate included | Yes | No | No |
| Free without limits | Yes | Yes | Partial |
| No installation required | Yes | No | Yes |
| Copy & download output | Yes | Yes | Partial |
| Merges rules / advanced restructuring | No | Yes | Partial |
Related developer tools
Free developer tools that run in your browser. Nothing uploaded, ever.
CSS Minifier
You are hereCompress CSS code to improve performance.
JS Minifier
Minify JavaScript to reduce file size.
HTML Minifier
Minify HTML, inline CSS and JS.
JSON Formatter
Format, validate and minify JSON.
SQL Formatter
Format and beautify SQL queries.
SVG Cleaner
Clean up messy SVG code.
JS Formatter
Beautify minified JavaScript.
Regex Tester
Test and debug regular expressions.
Your code never leaves your device
There is no upload step and no server-side handling. The CSS is read from your device, minified inside your browser tab, and saved back to your device. Nothing about the file, its name or its contents reaches any server. Open the browser network tab while using the tool and confirm there are no outbound requests carrying your code.