DevTilt

CSS Minifier

Compress CSS by removing extra whitespace. This MVP uses js-beautify in compact CSS mode. It does not rewrite colors or merge identical rules.

Result

Paste code, then Minify. Libraries load in your browser.

How to minify CSS

  1. Paste CSS.
  2. Click Minify.
  3. Whitespace around standard separators is collapsed (no cssnano rewrites).
  4. Copy or download the result. Use CSS Formatter to expand it again.

What is CSS Minifier?

Whitespace and comments in CSS add kilobytes across every page load. This minifier strips them while preserving rule semantics — useful when you need a compact stylesheet for embedding, email templates, or quick size comparisons without a full PostCSS pipeline.

Why use DevTilt's CSS Minifier?

  • Removes comments, whitespace, and unnecessary semicolons
  • Preserves selector and property semantics
  • Shows byte reduction after minification
  • Handles @media, @keyframes, and @import rules

Common use cases

  • Embedding minimal CSS in an HTML email template
  • Shrinking a critical CSS block for above-the-fold rendering
  • Comparing minified vs unminified file sizes before deployment
  • Preparing a compact stylesheet for a browser extension

FAQ

It only collapses whitespace around standard separators. Unusual hacks or data URIs with spaces can still need a review after minify.
cssnano is deferred. This page keeps the bundle smaller by reusing js-beautify already used for CSS format.
No. Minify runs in your browser.
No. This MVP only collapses whitespace. It does not run advanced optimizations like cssnano. Expect smaller files from spacing removal, not structural rewriting.
Savings depend on how much whitespace and indentation you had. Already-minified CSS may shrink only slightly. The tool shows before/after size when available.