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
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
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
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.
No. It only removes characters the browser was already ignoring when it renders the page. Layout, fonts, colors, and animations stay exactly the same — the only thing that changes is the source file.
A minifier removes characters from the source code before the file is served. GZIP (or Brotli) compresses the file during transfer over the network. They work at different stages and are meant to be used together, not as alternatives.
Open the BEAUTIFIER tab and paste the minified CSS into Minified CSS Input. It is reformatted right away with one declaration per line, two-space indentation and a blank line between rules, so you don't have to guess where rules start and end.
Indirectly, at most. CSS is render-blocking, so a smaller stylesheet can help the page render sooner and improve LCP. Whether that changes your rankings depends on everything else on the page; minifying is a small speed gain, not an SEO fix on its own.
Yes. Regular /* ... */ comments are removed, but comments that start with /*!, the usual convention for license and copyright notices, stay in the minified output.
Yes, this one. It runs entirely in your browser with no account, and your CSS is never sent to a server. You paste the code into the text box (there's no file upload), so you can minify or beautify as often as you need at no cost.
References
Related Tools
- SQL Formatter & Beautifier: Format SQL Queries Online Developer Paste a SQL query to get it indented, with uppercase keywords and one clause per line, or minify it. Works with MySQL, PostgreSQL and SQL Server syntax.
- XML Formatter & Validator: Pretty Print, Tree, XPath Developer Paste XML to pretty print or minify it, spot the line with the error, browse it as a tree, run XPath queries, diff two files or convert to JSON.
- JSON Formatter & Validator: Fix Errors, Tree View Developer Format, validate and minify JSON with errors shown by line and column, one-click fixes for trailing commas and quotes, and tree or graph views.
- ASCII Table Generator: Plain-Text & Markdown Tables Developer Turn CSV or typed data into a plain-text table: MySQL, Unicode box, rounded, double-line, Markdown, RST or minimal style. Copy it or download as .txt.
- Base64 Decode Online — Free Base64 to Text Decoder Developer Free online Base64 decoder — decode Base64 strings back to plain text instantly in your browser. Validates input and shows decoded payload size.