Minificador de CSS

Minifica CSS para reducir el tamaño del archivo: elimina comentarios y espacios, y muestra el ahorro.

CSS input
Minified output
AI

¿Qué es Minificador de CSS?

A CSS minifier removes everything a browser does not need to render your styles — comments, line breaks, indentation, and redundant characters like the last semicolon in a rule — to produce the smallest possible file. Smaller CSS means fewer bytes over the wire, faster downloads, and quicker first paint, which is why minification is a standard step in every production build pipeline.

This tool minifies CSS instantly in your browser and shows you exactly how many bytes you saved and the percentage reduction. It is perfect for quick one-off optimisation — a snippet you are about to inline, a small stylesheet without a build step, or checking how much a file would shrink before wiring up a bundler.

Casos de uso

Aquí tienes las formas más comunes en que la gente usa Minificador de CSS todos los días.

Inlining Critical CSS

To speed up first render, teams inline above-the-fold CSS directly in the HTML <head>. Minifying that block first keeps the HTML small. Paste your critical CSS, minify, and drop it straight into a <style> tag.

Static Sites Without a Build Step

Not every project has webpack or Vite. For a simple static site or landing page, paste your hand-written CSS here, minify it, and ship the smaller file — no tooling required.

Email and Embedded Widgets

HTML emails and third-party embed snippets have tight size budgets. Minified CSS helps you stay under limits while keeping your styles intact.

Quick Size Audits

Curious how much a stylesheet would shrink? Paste it to see the before/after byte count and savings percentage before deciding whether minification is worth automating.

Ejemplos

Ejemplo 1

Minifying a button rule

A formatted rule with comments collapses to a single line.

Entrada /* primary */ .btn { padding: 12px 24px; border-radius: 8px; }
Salida .btn{padding:12px 24px;border-radius:8px}
Ejemplo 2

Checking savings

The stats bar shows the reduction after minifying.

Entrada 2.4 KB stylesheet
Salida 1.6 KB minified — 33% smaller

Minificador de CSS frente a Build-tool minifiers

A quick browser minifier versus a bundler plugin like cssnano.

Característica Toolorah Build-tool minifiers
Setup required None — paste and go Configure a build pipeline
Good for one-off snippets Yes Overkill
Automatic on every build No Yes
Shows byte savings Yes Sometimes, via reports
Privacy (no upload) Yes — in-browser Local, but needs install

Consejos para usar Minificador de CSS

  • Minify only for production — keep your readable, commented source in version control and minify as a build/ship step.
  • Minification is safe and lossless: it never changes how your styles render, only removes characters browsers ignore.
  • For the biggest wins, also enable gzip/Brotli compression on your server — minified CSS compresses even further.
  • If a value looks wrong after minifying, check for an unclosed comment or a missing semicolon in your source.

Preguntas frecuentes

Does minifying change how my CSS works?

No. Minification only removes characters the browser ignores — comments, whitespace, and redundant semicolons. The resulting styles render identically to your original source.

Is my CSS uploaded anywhere?

No. Minification happens entirely in your browser. Your CSS is never sent to a server or stored, so it is safe for proprietary code.

How much smaller will my file get?

It depends on how much whitespace and how many comments your source has. Heavily commented, nicely formatted CSS often shrinks 25–50%. The tool shows your exact savings.

Can I un-minify (beautify) CSS?

This tool only minifies. To make minified CSS readable again you would use a CSS beautifier/formatter, which re-adds indentation and line breaks.

Should I minify by hand?

For one-off snippets, this tool is perfect. For a real project, configure your bundler (Vite, webpack, esbuild) or a PostCSS plugin like cssnano to minify automatically on every build.