Minified CSS is one unbroken line. When you need to read a production stylesheet — debugging a third-party widget, auditing what a framework actually ships, or recovering source you no longer have — formatting it is the first step to making sense of it.
How to use the CSS Beautifier
- Paste the minified CSS
- Click Beautify
- Read or edit the formatted output
- Minify again before deploying
What formatting restores, and what it cannot
Beautifying puts each selector, declaration and brace on its own line with consistent indentation. The structure becomes visible again: you can see where rules begin and end, which selectors group together, and how media queries nest.
What it cannot bring back is anything minification discarded permanently. Comments are gone. Original variable names, if the CSS was compiled from Sass or Less, were resolved at build time and no longer exist. Blank-line grouping that separated logical sections is lost.
Formatted minified CSS is readable, not restored. It is not a substitute for the original source.
Reading an unfamiliar stylesheet
Once formatted, a few things orient you quickly. Scan for @media blocks to understand the responsive breakpoints. Look at the specificity of selectors — long chains and !important usually mark places where the cascade was fought rather than used. Check whether custom properties are defined on :root, which tells you whether theming is centralised.
Auditing a stylesheet you did not write
Once a minified stylesheet is formatted, a handful of searches tell you most of what you need to know about it.
Count the !important declarations. A handful is normal. Dozens means the cascade was being fought rather than used, and any change you make will probably need another one.
Look at selector length. Chains like .page .content .sidebar ul li a indicate specificity escalation — each one is hard to override, which is how stylesheets become append-only.
Check :root for custom properties. Their presence tells you theming is centralised and that you can probably change a colour in one place. Their absence tells you the opposite.
Find the @media blocks to learn the breakpoints, which are rarely documented anywhere else.
Scan for vendor prefixes. A stylesheet full of -webkit- and -moz- on properties that have been standard for years is old, or built with an autoprefixer targeting ancient browsers — either way it is carrying weight it does not need.
Formatting as the first step in a rewrite
Beautifying is often the opening move when you have to take over a stylesheet with no source. The formatted file is readable but still machine-shaped, and a few further steps make it maintainable.
Group related rules. Minified output preserves source order, which in a compiled bundle is the concatenation order of files that no longer exist. Rules for one component are frequently scattered. Collecting them is the single biggest readability improvement.
Extract the repeated values. The same colour appearing forty times was almost certainly one variable before compilation. Promoting it back to a custom property on :root restores the ability to change it once.
Re-add the comments as you work out what things do. You cannot recover the originals, and the understanding you build while reading is worth writing down.
Keep the minified original as the reference. The formatted version is your working copy, and being able to diff rendered output against the original is what lets you refactor with any confidence.
Finding out which rules are actually used
Formatting a stylesheet tells you what is in it. The next question — which of it matters — needs different tooling, and the answer is usually sobering.
Chrome's developer tools include a Coverage panel that records which CSS rules are used as you interact with a page. It commonly reports 70–90% unused on a site built with a general-purpose framework. Run it while clicking through the real flows, not just the landing page, or the figure will overstate the waste.
Two cautions when acting on it. Coverage only sees what you exercised, so rules for states you did not trigger — error messages, modals, hover styles — appear unused when they are not. And rules targeting classes your JavaScript adds at runtime are invisible to static analysis entirely, which is why tools that strip unused CSS accept a safelist.
The safe way to remove dead CSS is incrementally: delete a block, exercise the affected pages, confirm nothing changed, commit. Tedious, and considerably better than a single large deletion you cannot bisect when something breaks three weeks later.
Frequently asked questions
Will beautifying recover my comments?
No. Minification removes comments from the file entirely — they are not stored anywhere. Only the original source has them.
Does formatting change how the CSS behaves?
No. Whitespace between tokens is insignificant in CSS, so the formatted and minified versions render identically.
Can I recover the original Sass or Less source?
No. Preprocessors compile to plain CSS at build time — variables, mixins and nesting are all resolved away and cannot be reconstructed.
Is it safe to paste proprietary CSS here?
Yes. Formatting happens entirely in your browser and nothing is uploaded or stored.