CSS Minifier
Paste CSS to strip comments and whitespace and shrink the file. Minification runs entirely in your browser, and your strings and url() values are preserved exactly.
How to minify CSS
- Paste your CSS into the editor.
- The minified output and size savings update instantly.
- Copy the result or download it as a .css file.
Examples
Strip comments and whitespace
/* card */
.card {
color: red;
margin: 0;
}
.card{color:red;margin:0}Frequently asked questions
Is my CSS uploaded to a server?
No. Minification happens entirely in your browser, so your CSS never leaves your device.
How does the minifier shrink my CSS?
It removes comments and collapses whitespace, then drops spaces around braces, colons, semicolons and commas, including the last semicolon before a closing brace.
Will it break my content or url() values?
No. Text inside quoted strings and url() is preserved exactly, so spacing in content values and file paths stays intact.
Does minified CSS still work the same?
Yes. Minification only removes characters browsers ignore, so the rules and their meaning are unchanged.
How much smaller will my file get?
It depends on how many comments and how much whitespace you have. The tool shows the original size, minified size and percent saved.
Related tools
CSS Gradient Generator
Build linear and radial CSS gradients with a live preview. Pick colors, set the angle and copy ready-to-paste background code for your site.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.
Base58 Encoder
Encode and decode Base58 online with the Bitcoin alphabet. Convert text to Base58 or back, UTF-8 safe, no confusing 0 O I l. Runs in your browser.
Base64 Decode
Decode Base64 to plain text online. Paste a Base64 or base64url string and get instant UTF-8 output. Free, fast and runs in your browser.