Outils développeur outil
CSS Minifier
Minify CSS by stripping comments, blank lines, and excess whitespace to ship smaller stylesheets.
Free online CSS minifier. Strip comments, whitespace, and trailing semicolons to ship smaller stylesheets and improve page load times.
Pourquoi les utilisateurs emploient cet outil
CSS Minifier removes comments and unnecessary whitespace so stylesheets ship smaller and render faster. It is ideal for trimming hand-written CSS before deployment or for cleaning up snippets pasted from documentation.
- Trim hand-written stylesheets before deploying to production.
- Compress small CSS overrides added inside a CMS template.
- Reduce email template CSS to fit inside inbox size budgets.
Comment l’utiliser
- 1Paste your CSS rules into the input area.
- 2Check the original vs minified character counts and savings ratio.
- 3Copy the minified CSS and ship it.
Best practices
- Keep the original, formatted source under version control.
- Always test layouts after minifying — especially when using fragile selectors.
- Combine minification with gzip or brotli at the server for the largest win.
- Use a real bundler (esbuild, Lightning CSS) for large projects with imports and variables.
Common mistakes to avoid
- Do not minify CSS that depends on comments for tooling (some PostCSS plugins do this).
- Do not assume minified CSS works identically with all legacy browsers without testing.
- Do not use this tool as a replacement for a proper build pipeline on large codebases.
- Do not paste sensitive data — even though processing happens locally.
FAQ
Réponses utilesWill minification break my CSS?
A whitespace-only minifier like this preserves selectors and rules. Visual differences should be limited to whitespace handling.
Is the CSS sent to a server?
No. Minification happens entirely in your browser.
Should I also minify CSS variables?
Variable names are preserved as written. If you want shorter names, use a build-time CSS minifier like Lightning CSS or csso.