Welcome Back

Enter your details to access your account.

OR
Developer Tools

CSS Minifier

Minify and beautify CSS code to reduce file size or improve readability.

Free · No sign‑up Added Jun 2026
0 bytes
0 bytes

About CSS Minifier

Paste your CSS and this tool removes the comments and extra whitespace to make the file smaller, then shows the original size, the new size and the percentage saved. It also has a Beautify button that does the reverse and lays minified CSS out with one declaration per line and indented rules, so you can read it.

It is careful with the parts of CSS where spaces matter. Text inside quotes, such as content: "a ; b", and url(...) values, including data URIs, are left untouched. The space in a selector like .menu :hover is kept, because removing it would change what the rule matches, and the spaces inside calc() are kept as the CSS rules require.

This is a basic minifier. It removes comments and whitespace and the last semicolon in each rule, but it does not merge rules, shorten colours, rewrite shorthand properties or remove unused CSS, so build tools such as cssnano can save more. Always test the result on your site before you deploy it.

Who uses it and when

Quick size savings

Shrink a stylesheet or a CSS snippet before using it.

Reading minified CSS

Beautify a one-line file to see its rules.

Inline styles and emails

Keep a style block short.

Checking savings

See how many bytes minifying saves.

Why use this CSS Minifier

Minify and beautify CSS safely, in your browser.

Minify

Removes comments and unneeded whitespace.

Beautify

Lays out compressed CSS so it is readable.

Protects strings and url()

Quoted text and data URIs are never changed.

How it works

Paste your CSS

Put the code in the input box.

Minify or Beautify

Choose the action.

Copy the output

Check the size savings, then copy.

Frequently asked questions

Is it safe for my CSS?

It keeps strings, url() values and meaningful spaces. Still, test the result before you publish.

How much will it save?

It depends on how much whitespace and how many comments you have. The tool shows the exact saving.

Does it merge or shorten rules?

No. It is a basic whitespace and comment minifier.

Is my CSS uploaded?

No. It runs in your browser.