⚡
usefultools.dev
CSS

CSS Minifier

NOVO

Minify CSS with csso: remove whitespace and comments, merge rules, and see the size saved before you copy it.

Funciona 100% no seu navegador — o que você insere nunca é enviado nem armazenado nos nossos servidores.

Esta ferramenta ainda não está totalmente traduzida, por isso parte do texto continua em inglês. A ferramenta funciona da mesma forma em todos os idiomas.

529 B

@import rules and url() references are never fetched or inlined, only tidied. An @import placed after other rules is invalid CSS and is dropped by the minifier, so keep imports at the top.

⚡

Exemplos rápidos

Entradas típicas e os resultados que esta ferramenta gera.

Whitespace
.btn { color: #ff0000; margin: 0px; }
.btn{color:red;margin:0}
Merge
a { color: red; } b { color: red; }
a,b{color:red}
Shorten
.a { background: rgba(255, 255, 255, 1.0); width: 0.50em; }
.a{background:#fff;width:.5em}
Comments
/*! MIT */ /* note */ p { margin: 0 }
/*! MIT */ p{margin:0}
Values
a { font-weight: bold; color: #AABBCC }
a{font-weight:700;color:#abc}
📖

Visão geral

This CSS minifier compresses stylesheets with csso. It strips whitespace and comments, shortens colors and numbers, and merges duplicate selectors and declarations, so the file is smaller and loads faster without changing how the page looks.

Front-end developers use it to shrink a stylesheet or a snippet before deploying, or to check how much a CSS minify step would save. Decide whether to restructure rules, and keep legal /*! comments, only the first one, or none. Parse problems are listed with their line and column.

Processing happens entirely in your browser. Nothing is uploaded, and you get the original and minified size, percent saved and a gzip estimate as soon as it finishes.

Por que usar esta ferramenta?

  • Smaller CSS with csso structural optimization
  • Keep license comments or remove them all
  • Shows size, gzip and rule count savings
  • Reports invalid CSS with line and column
  • Private: styles never leave your browser
⭐

Recursos

🗜️

Whitespace and comments

Removes spaces, line breaks and comments while keeping the styles identical.

🔀

Rule restructuring

Merges duplicate selectors and declarations, with an option to turn it off.

©️

Legal comments

Keep every /*! comment, only the first, or remove all comments.

🎨

Shorter values

Turns #ff0000 into red, 0px into 0 and 0.50em into .5em.

📊

Size report

Original and minified bytes, percent saved, gzip estimate and rule and declaration counts.

📂

Upload and download

Drop a .css file in, then copy the result or download it as .min.css.

🛠️

Como usar

1

Add your CSS

Paste a stylesheet into the CSS input box, drop a .css file onto it, or press Sample.

2

Choose options

Keep Restructure rules ticked for the smallest output and pick how Comments are handled.

3

Minify

Press Minify, or leave Minify as I type on. Review the size saved and any parse issues.

4

Copy or download

Press Copy or Download .min.css and use it in production.

🤔

Perguntas frequentes