CSS minification applies a series of transformations to reduce file size.
Loading Unminifier Beautifier…
Reverses whitespace removal from cssnano, clean-css, and UglifyCSS output
Restores indentation, newlines, and spacing between all tokens
Preserves all semantic content unchanged (selectors, values, at-rules)
Browser-based: paste minified CSS and get readable output instantly
Drop the Unminifier Beautifier into any page — blog post, product docs, intranet, school portal — with a single line of HTML. Your visitors get the full tool, processed entirely in their browser. No backend, no uploads, no signup.
Embed code
<iframe
src="https://www.fixtools.io/css-tool/unminifier-beautifier?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="Unminifier Beautifier by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
cssnano is the most widely used CSS minifier. It runs as a PostCSS plugin and is the default minifier in webpack's css-minimizer-webpack-plugin. cssnano applies several transformation passes. The first removes all whitespace: spaces, tabs, and newlines that are not part of a string value. The second removes all comments. The third applies semantic optimisations: it uses cssnano's preset-default configuration to merge adjacent rules with identical declarations, remove duplicate properties within a rule, convert hex colours to shorter forms, strip zero units, normalise url() paths, and more. clean-css, which powers Grunt and Gulp CSS minification plugins, applies similar transformations with some differences in which semantic optimisations it enables by default. UglifyCSS is a simpler tool that focuses primarily on whitespace removal with fewer semantic optimisations.
Understanding which tool produced a minified file can help you interpret the output. cssnano-minified CSS often shows merged selector groups (multiple comma-separated selectors where the original source had separate rules) and normalised colour values. clean-css output may have slightly different shorthand property consolidations. UglifyCSS output will more closely resemble the original source structure since it applies fewer semantic changes. If you are debugging a build pipeline issue, knowing which minifier is in use helps you predict which transformations to look for.
Reversing minification restores whitespace exactly. The reversal process parses the minified token stream using the CSS grammar and reinserts standardised whitespace at every structural boundary. A newline and indentation appear before each declaration. A newline appears after each closing brace. A space appears between the selector and the opening brace. All at-rule contents are indented one additional level. What the reversal does not restore is any information that was discarded rather than compressed: code comments are gone, original variable name choices are gone (if a build tool renamed them), and any values that were optimised into a different but equivalent form reflect the optimised form.
Source maps deserve explicit consideration before you reach for the reversal tool. Most modern minifier configurations emit a .css.map file and reference it via a sourceMappingURL comment at the bottom of the minified CSS. When the map is reachable, Chrome and Firefox DevTools transparently substitute the original authored source in the Sources panel, complete with comments, original variable names, and preprocessor structure. That is strictly higher fidelity than any reversal output because it shows what the developer actually wrote rather than what survived minification. Production deployments often strip or 404 the map for security and bandwidth reasons. Before pasting into FixTools, check the last few lines of the minified content for a sourceMappingURL directive and fetch the referenced map directly. If it loads, prefer DevTools with the map attached. If it returns an error, the reversal is your best available path to readable code.
Paste the minified output from cssnano, clean-css, UglifyCSS, or any other CSS minifier. The reversal process re-expands all compressed rule blocks and declaration lists, producing formatted code with proper indentation throughout.
Step-by-step guide to reverse css minification:
Identify the minified CSS source and its origin
Note which build tool generated the minified CSS (webpack with cssnano, Vite with Lightning CSS, Gulp with clean-css) if known. This context helps you interpret the reversed output. Copy the minified CSS from the build output file or the production server response.
Paste into FixTools and reverse
Open FixTools CSS Unminifier, paste the minified content, and click Unminify. The tool reverses the whitespace removal across all rule types, at-rules, and declaration lists.
Identify minifier-specific transformations in the output
Scan the reversed output for merged selector groups (cssnano), consolidated shorthand properties (clean-css), or inline @import statements. These patterns are evidence of specific minifier optimisations that you should account for if you plan to edit the reversed code.
Compare against source if available
If the original source file exists, open both the reversed output and the source side by side in a diff tool. Differences between them represent the semantic optimisations the minifier applied. Use this comparison to understand exactly what the build pipeline changed.
Common situations where this approach makes a real difference:
Diagnosing an unexpected minifier behaviour
A developer adds a new CSS rule and the production site renders differently than expected. They reverse the minified production CSS and compare it against the source. The comparison reveals that cssnano's mergeRules plugin combined their new rule with an adjacent rule that had identical declarations, changing the selector list. The developer adds a comment between the two rules to prevent merging, rebuilds, and the production CSS matches expectations.
Verifying a migration from clean-css to cssnano
A team migrates their build pipeline from Gulp with clean-css to webpack with cssnano. They reverse both the old clean-css output and the new cssnano output, then compare the two formatted files. The comparison shows that cssnano applies more colour shortening and merges several rule sets that clean-css left separate. They adjust their cssnano configuration to disable mergeRules and rebuild, producing output that more closely matches their expected structure.
Understanding what Lightning CSS preserved vs optimised
A developer using Vite (which uses Lightning CSS for minification) wants to understand what Lightning CSS changed in their stylesheet. They reverse the minified output and compare it against the source SCSS compiled output. The comparison shows that Lightning CSS inlined several custom property var() calls and removed some vendor prefixes that it determined were no longer needed for the configured browser targets. This confirms the build is correctly targeting modern browsers.
Investigating a production CSS anomaly report
A QA engineer reports that a colour on the live site does not match the design spec. A developer reverses the production minified CSS and searches for the component's class name. The reversed output shows that the background-color value is a three-digit hex that, when expanded to six digits, does not match the design token. They trace the issue back to a naming collision where two similar class names had different intended colours but cssnano merged their rules because their other declarations matched.
Get better results with these expert suggestions:
Identify cssnano-merged rules by looking for comma selector groups
cssnano's mergeRules plugin combines selectors that share identical declaration blocks. After reversing, a rule like h1, h2, h3 { font-weight: bold } where the original source had three separate rules is a sign of cssnano with mergeRules enabled. If you need to edit only one of those selectors, split the merged rule back into separate blocks first.
Recognise clean-css shorthand consolidation
clean-css consolidates longhand properties into shorthands. Four separate margin properties become margin: top right bottom left. If the reversed output shows shorthand properties for margin, padding, border, or background that you originally wrote as longhands, clean-css combined them. You can safely re-expand them to longhands if your project uses that style.
Test reversal output byte count against the minified input
A healthy reversal should produce a file around three to six times the character count of the minified input, depending on how heavily commented and spaced the original source was. If the reversed output is less than double the minified input, the input may have been a small snippet rather than a complete stylesheet.
Use reversal to verify build pipeline optimisations
After changing minifier configuration (switching from cssnano default to advanced, or enabling additional clean-css optimisation levels), reverse the new minified output and compare it against the previously reversed output. This shows you exactly what additional transformations the new configuration applied, helping you confirm the change had the intended effect.
Check your build tool to identify which minifier was used
webpack uses css-minimizer-webpack-plugin (cssnano by default). Vite uses Lightning CSS or esbuild. Gulp and Grunt projects typically use clean-css via gulp-clean-css. Knowing the minifier tells you which semantic optimisations were applied and sets expectations for what the reversed output will look like.
Use a source map if one is available
Before reversing minification manually, check whether the build produced a source map (.css.map file). Source maps allow Chrome DevTools to show you the original source file directly in the Sources panel. If a source map is available, use it in DevTools rather than reversing the minified output.
Compare cssnano levels for different build outputs
cssnano has multiple optimisation presets. The default preset applies moderate optimisations. The advanced preset applies aggressive rule merging. If the reversed output looks more transformed than expected, the build may have used the advanced preset.
More use-case guides for the same tool:
Open the full Unminifier Beautifier — free, no account needed, works on any device.
Open Unminifier Beautifier →Free · No account needed · Works on any device