Developer Tools

Free CSS Minifier & Beautifier

Compress CSS by stripping comments and whitespace, or re-indent it for readability. Preserves strings, URLs and important comments β€” all in your browser.

Instant Minify 100% Private Syntax Highlighting Smart Compression

Input CSS

0 chars Β· 0 lines Empty
Tip: press Ctrl + Enter to minify instantly. Strings, url() contents and /*! */ comments are always preserved.

Output

Minified CSS will appear here

What Is CSS Minification?

CSS minification removes every byte that CSS doesn't need: comments, redundant whitespace, trailing semicolons, and unnecessary units. The output renders identically to the input, but weighs significantly less. Typical savings range from 20% to 40% of the original file size.

Because CSS is render-blocking β€” the browser must download and parse it before painting anything β€” even small size reductions improve page performance.

Minify vs Beautify

ModePurposeWhen to use
MinifyRemove whitespace, comments and unneeded charactersProduction deployment
BeautifyRe-indent rules for readabilityEditing, debugging, code review

What gets removed

What is preserved

Common use cases

Production Deploy

Ship the smallest possible CSS to every visitor.

Improve Page Speed

CSS is render-blocking β€” smaller means faster first paint.

Cleaner Diffs

Beautify before committing so Git diffs show real changes.

Learn CSS Structure

Beautify minified CSS to understand what a site is doing.

Reduce Bandwidth

Save meaningful KB on every page view across millions of hits.

Inline Critical CSS

Minify before inlining above-the-fold CSS in the HTML head.

Mobile Performance

Smaller CSS loads faster on slow mobile networks.

Quick Validation

Paste CSS to spot malformed braces or stray characters.

Privacy and security

This CSS minifier runs entirely in your browser. A custom tokenizer walks the input, strips unneeded characters and re-emits the result β€” all in local JavaScript. Your CSS never leaves your device, safe for internal stylesheets, proprietary designs and unreleased work.

Frequently Asked Questions

What does a CSS minifier do?
A CSS minifier removes unnecessary characters from CSS: comments, extra whitespace, and unneeded semicolons. It produces a smaller file that renders identically. Typical savings are 20–40% of the original file size.
Will minifying break my CSS?
No. Minification never changes how CSS renders. Whitespace between tokens, comments, and the final semicolon in a rule block are all insignificant in CSS.
Does it remove my licence comment?
Only if it starts with the standard /*! marker. Comments beginning with /*! are preserved by default so your licence header stays in the file.
What about calc() expressions?
Spaces inside calc() are preserved because CSS requires whitespace around + and - operators. We never touch content inside calc(), var(), or any other function with string arguments.
Can I beautify minified CSS?
Yes. Switch to the Beautify tab and the tool re-indents the CSS so it's readable. Choose your indent size (1, 2, 4, or Tab).
What is the maximum CSS size?
There's no hard limit, but CSS above roughly 1 MB will start to feel slow because of live syntax highlighting. Turn off live update and use the Process Now button for very large files.
Is my CSS uploaded to a server?
No. All processing happens locally in your browser using a custom character-by-character tokenizer. Your CSS never leaves your device.
Is this CSS minifier free?
Yes. It is 100% free, requires no sign-up, and runs entirely in your browser.

Related Developer Tools

Done!