Toolhaus

CSS Minifier & Beautifier

Minify CSS to shrink it or beautify it for readability.

Paste CSS to strip comments and whitespace for a smaller file, or reformat it with clean indentation. Strings, calc() and pseudo-selectors are preserved. All local.

Output · 20% smaller
.hero{color: #ff0000;margin: 0 auto}

Formula & methodology

Minify removes comments and collapses whitespace around structural characters while keeping strings and calc() intact. Beautify re-indents each rule and declaration.

Worked example

  • .a { color: red; margin: 0 auto; } → .a{color: red;margin: 0 auto}

Frequently asked questions

Is my CSS uploaded?

No. Minifying and beautifying happen entirely in your browser.

Will it break calc() or media queries?

No. The minifier keeps spaces inside calc() and around selectors, so output stays valid.

Privacy

All processing happens locally in your browser. Your data is never uploaded.

Read the practical guide for this category.

Related tools