Skip to content
← Back

CSS Minifier / Formatter - Online CSS Compression

Code
Runs locally · Not uploaded

Online CSS minification and formatting tool: compress by removing comments and whitespace, or format with proper layout. Protects string literals.

Was this result helpful?

For local tools, open DevTools → Network and search your input — it should not appear in requests.

Next steps

Usage Guide

Minify CSS locally and compare byte size — a complement to, not a replacement for, build pipelines.

1. Minify

Paste CSS, compress, compare bytes, verify on a real page.

2. Fit

Handy for single files and emergencies; CI should still own production CSS.

3. What stays

License headers and unusual hacks may need manual care.

4. Colors/units

Hex shortening is usually safe; prefixing/compat is out of scope.

5. With other minifiers

Compress HTML/JS separately after features work.

6. Accept

Hard-refresh critical pages and diff if layout shifts.

FAQ

It strips comments and redundant whitespace, drops the last semicolon before each closing brace, shortens hex colors whose digit pairs repeat (#ffffff to #fff, #rrggbbaa to #rgba), and collapses zero values like 0px or 0em to 0 (percentages excluded). String literals and the inside of calc() are protected from mangling, and the page shows a before/after comparison in both characters and UTF-8 bytes.

No — minification is irreversible, so keep the original file. A code formatter can re-indent the output for readability, but comments and the original spacing are gone for good.

License banners (comments starting with /*!) are kept by default — verify that any legally required headers survived. Some sourceMappingURL comments and hack-style rules that depend on exact formatting need human judgment. The minifier only shrinks lexically; it does not understand what your styles mean.

It shines on single files, extracted style blocks, slimming CSS before inlining into email, and quick fixes. Large projects should rely on a bundler or cssnano in the build pipeline — this page is a touch-up tool, not a CI replacement.

Hard-refresh the key pages and watch the layout, especially pseudo-element content strings and spaces inside attribute selectors; if anything looks off, diff the output against the original. It also does not downgrade syntax for older browsers — that is autoprefixer's job, not this tool's.

No. The CSS stays in the browser from paste to output, and the minified result is never posted back to any backend.

Related Tools

Related Articles