CSS Minifier & Beautifier: Minify or Unminify CSS

CSS Minifier & Beautifier: Minify or Unminify CSS

Paste CSS to get the minified version and the bytes saved instantly. It also unminifies CSS back to readable code and keeps your last 20 results locally.

Updated November 2026

Reviewed by Rafael Duarte

⠿ Minification Options

Efficiency Report

Paste CSS to see stats.

Input CSS

Minified CSS Output

Shift + Enter to Copy

How to minify CSS online

Two modes, one production-ready result

1. Paste your CSS

In the MINIFIER tab, paste it into Input CSS. To go the other way, paste compressed CSS into Minified CSS Input in the BEAUTIFIER tab.

2. Pick Minifier or Beautifier

The output updates as you type. In the Minifier, the Efficiency Report shows the original size, the minified size and the compression ratio.

3. Copy or download

Click Copy to Clipboard or Download .css (styles.min.css from the Minifier, styles.css from the Beautifier) and paste the result into your project.

What this CSS compressor does

Minify and un-minify in the same interface

Strips the excess

Whitespace, line breaks, comments and the last semicolon before each } are removed. License comments written as /*! ... */ are kept, and strings and url() values are left untouched.

Shortens hex colors

With Shorten Color Values on, #ffffff becomes #fff with no change to the rendered color. It only touches declaration values, never selectors such as an #aabbcc id.

Optional empty-rule removal

Turn on Remove Empty Rules (off by default) to drop rules like .unused {} that have no declarations.

Reverse beautifier

Takes compressed CSS and returns it with consistent indentation and spacing, so you can unminify a stylesheet in one paste.

Local history

The HISTORY tab keeps your last 20 results in your browser. Load in Beautifier reopens a minified result for formatting, and Load in Minifier does the reverse.

100% in your browser

All processing runs locally — no CSS is ever sent to a server.

When to use each mode

Situation
Mode
Shipping a site to production
Minifier
Improving your PageSpeed Insights score
Minifier
Debugging a minified stylesheet
Beautifier
Reading unformatted CSS from a framework
Beautifier

When you'll reach for this tool

The scenarios that come up most often

Optimizing Core Web Vitals

CSS blocks rendering until it downloads, so a smaller stylesheet can help the page paint sooner and improve LCP.

Debugging third-party CSS

Switch to the Beautifier to reformat CSS pulled from a framework or page builder.

Cutting bandwidth and CDN costs

The saving depends on how much whitespace and how many comments the file has. The Efficiency Report shows the exact bytes saved, which add up on high-traffic sites.

Reviewing code before a refactor

Beautify a third party's CSS to understand its structure before you touch it.

Common mistakes

Thinking minified CSS breaks the site

Minification only removes characters the browser already ignores — layout, colors, and animations stay identical.

Confusing minification with GZIP or Brotli

They're complementary: the minifier shrinks the source code, and GZIP or Brotli compresses it again while the server sends it.

Editing minified CSS by hand

One-line stylesheets are error-prone to edit directly — run it through the Beautifier first.

Why use this tool

It covers both directions in a single interface: minify for deploy, beautify for debugging. The last 20 results stay in the History tab, and each one can be sent to the opposite mode with one click.

Everything runs in your browser with plain JavaScript. Nothing to install, no account, and your CSS never leaves your machine.

CSS minifier vs. GZIP or Brotli compression

Complementary, not substitutes

CSS Minifier
GZIP / Brotli
Where it acts
source code
network transfer (server)
When to apply
before deploy
server configuration
Shrinks the saved file
yes
no — compresses in transit
Use both together
recommended
recommended

Frequently asked questions

A CSS minifier strips unnecessary characters — whitespace, comments, line breaks, redundant semicolons — from a stylesheet without changing how the page looks. How much it saves depends on how much whitespace and how many comments the file has; here the Efficiency Report shows the exact saving for your CSS.

References

Related Tools