CSS Minifier
Compress CSS to its smallest equivalent form by removing comments, collapsing whitespace, and stripping the trailing semicolon before each closing brace.
Resumo da ferramenta
Esta ferramenta aceita entrada estruturada e devolve saída determinística no navegador, sem upload para o servidor.
- Nome da ferramenta
- CSS Minifier
- Intenção da entrada
- Forneça conteúdo de origem para transformar, validar ou analisar.
- Intenção da saída
- Receba uma saída normalizada pronta para copiar, reusar ou depurar.
- Entrada de exemplo
- /* primary button */ .btn { color: red; padding: 8px 16px; }
- Saída de exemplo
- .btn{color:red;padding:8px 16px}
url(...), and quoted values are preserved.Introdução à ferramenta
Compress CSS to its smallest equivalent form by removing comments, collapsing whitespace, and stripping the trailing semicolon before each closing brace.
Visão geral da ferramenta
CSS minification removes characters the browser does not need to render styles correctly. This tool strips /* ... */ comments, collapses runs of whitespace outside of strings, and removes whitespace around structural punctuation ({ } : ; , >). Strings inside url(...) and quoted values are preserved exactly. Byte counts before and after are reported so you can see the savings at a glance. Everything runs in your browser.
Casos de uso
- Inline critical CSS into <head> with the minimum possible bytes.
- Quickly compress hand-written CSS without spinning up a build pipeline.
- Squeeze additional bytes out of stylesheets already processed by Tailwind or PostCSS.
Exemplos de entrada/saída
/* primary button */
.btn {
color: red;
padding: 8px 16px;
}.btn{color:red;padding:8px 16px}Perguntas frequentes
Will minification break url() values or strings?+
Does it support nested CSS or @media blocks?+
Will it rename selectors or shorten colors?+
Explore mais ferramentas
Descubra utilitários relacionados na categoria Desenvolvedores abaixo.
Ferramentas relacionadas
Utilitários selecionados que você pode achar úteis