In short: what does a CSS minifier do?
A CSS minifier strips the characters a browser does not need to apply styles — comments, redundant whitespace, the trailing semicolon in a block and verbose values — and rewrites colours and units into their shortest equivalent form to produce a smaller, faster-loading stylesheet that renders identically. This tool also lets you beautify CSS, run a deep analyzer, score quality, maintainability and performance, inspect specificity and Core Web Vitals, detect your framework and convert CSS to SCSS or JSON — all 100% in your browser, with no styles ever uploaded.
Lossless minification
Strip comments and whitespace and shorten values with granular, conservative-by-default options.
Beautify & format
Pretty-print minified or machine-generated CSS with your chosen indentation.
Structure analyzer
Rules, selectors, declarations, media queries, keyframes, colours and validation.
Quality, maintainability & perf scores
Static-analysis audits with 0–100 scores, A–F grades and itemised checks.
Specificity analysis
Per-selector specificity with your max, average and top offenders to flatten.
Core Web Vitals guidance
Targeted LCP, CLS, INP, FCP and TTFB fixes derived from your stylesheet.
What is CSS minification?
CSS (Cascading Style Sheets) is the language that describes how a web page looks — the rules, selectors and declarations the browser applies to elements to control colour, spacing, layout and motion. To stay readable while you author it, CSS is normally written with generous indentation, blank lines between rules, explanatory comments and one declaration per line. None of that formatting affects the rendered result: the browser parses the rules into a stylesheet object and applies them regardless of how the source was spaced. The whitespace and comments exist purely for the humans who write and maintain the file.
CSS minification is the process of removing exactly those redundant characters — comments, insignificant whitespace, the final semicolon in each block — and rewriting values into their shortest equivalent form, so the file becomes as small as possible while producing a pixel-for-pixel identical render. For example #ffffff collapses to #fff, a length of 0px becomes 0, and a leading zero in 0.5 drops to .5. It is a lossless transformation in the only sense that matters: the styling that reaches the user looks exactly the same, but it arrives in fewer bytes. Where beautifying spreads rules out for readability, minifying does the inverse, packing the stylesheet tight for delivery.
A good minifier is also conservative. It must never change the meaning of a rule: !important flags, custom properties (CSS variables), at-rules such as media and keyframes, vendor-prefixed properties and string contents all have to survive untouched. It can safely merge exact-duplicate declarations and keep the last value of a repeated property (matching the cascade), but the one optimisation that can subtly affect ordering — merging rules that share an identical selector — is left off by default and clearly labelled, so production output stays correct.
Minification sits at the very end of the authoring pipeline: you write clean, well-formatted CSS for yourself and your team, and the minifier produces the compact version that ships to production. This tool parses your CSS once into a structured tree, then walks that tree applying each enabled optimisation — so you get the savings without the risk of a broken stylesheet. Because every step runs locally using browser APIs, you can safely paste proprietary design systems, unreleased themes and confidential styles; nothing leaves your device.
Why CSS optimization matters
CSS is render-blocking by default: a browser will not paint a single pixel until it has downloaded and parsed the stylesheets the page references, because it cannot know how anything should look until it does. That puts CSS squarely on the critical path, right alongside the HTML document itself. Every byte of stylesheet you remove is a byte the browser fetches and parses sooner, which directly advances the moment the page becomes visible. On fast connections the win is modest; on slow mobile networks, congested Wi-Fi or high-latency links, trimming kilobytes of whitespace, comments and verbose values can measurably accelerate First Contentful Paint and the moment the page feels usable.
The benefits compound across four dimensions. Speed: fewer bytes mean less transfer time and less parsing work before the first paint. Render-blocking relief: a leaner stylesheet clears the critical path faster, so layout starts sooner. Bandwidth: at scale, smaller files multiplied by millions of requests is a real reduction in data served. Core Web Vitals: a lighter stylesheet contributes to better LCP and FCP, which are ranking and user-experience signals — and reduced layout work helps INP stay responsive. Most CDNs and hosts also bill by egress, so smaller responses lower the bill and are kinder to users on metered data plans.
Crucially, none of this changes how your site looks. The browser applies the same rules from minified CSS, so the rendered design is identical — only the delivery is faster. Minification is one of the rare optimisations that is essentially free of downside when done conservatively. Here is what gets optimised and how safe each transformation is:
| What gets optimised | Effect | Safety |
|---|---|---|
| Comments | High — comments can be verbose | Safe (/*! license comments kept) |
| Whitespace | Highest — indentation dominates source | Safe — never inside strings |
| Hex colours | #ffffff → #fff, lowercased | Safe — identical colour |
| 0 units | 0px → 0, 0.5 → .5 | Safe — time units left intact |
| Duplicate props | Keep last value (cascade-correct) | Safe — matches the cascade |
| Empty rules | Removed entirely | Safe — no declarations to apply |
For typical hand-written or framework-generated stylesheets — which carry plenty of indentation, comments and long-form values — savings of 10–60% on the raw CSS are common before gzip, and the tool shows the exact bytes saved and the percentage reduction for your specific input in real time.
CSS performance best practices
Minification is the most obvious CSS optimisation, but the way you load and structure your stylesheets has an even larger effect on how quickly a browser can paint the page. The Analyze and Performance tabs in this tool surface the factors that matter most, scoring your stylesheet out of 100 with itemised, actionable checks so you know exactly what to fix.
Critical CSS is the highest-leverage technique. Because CSS blocks rendering, the fastest pages inline only the small slice of styles needed to paint above-the-fold content and defer the rest — loading the full stylesheet asynchronously with a media-swap trick or after first paint. That way the first view is never held hostage to a large global stylesheet, and FCP and LCP both improve. Keeping critical CSS small (a few kilobytes) is the goal.
- Avoid @import. An
@importinside CSS creates a serial, render-blocking round-trip: the browser must fetch the importing sheet, discover the import, then fetch the imported one before painting. Bundle stylesheets at build time instead, or link them in parallel from the HTML. The performance audit flags every@importit finds. - Minify, then compress. Minify to remove literal redundancy, then serve the result with Brotli or gzip. The two attack different redundancies, and minified CSS compresses slightly better because there is less repetitive text to encode.
- Reduce unused CSS. Shipped-but-unused rules are pure waste. Use a coverage tool to find them and a purge step (PurgeCSS, framework JIT) to remove them, then minify what remains. The analyzer flags the static signals it can see — empty rules and unused variables.
- Write efficient selectors. The browser matches selectors right-to-left, so deep descendant chains and broad universal selectors cost more to evaluate. The performance audit counts
*selectors, deep four-plus-level chains and heavy attribute selectors so you can flatten the expensive ones. - Control file size and rule count. The audit grades the total weight and reminds you to split critical from deferred CSS for very large sheets, keeping each request lean.
Treat the score as directional guidance rather than gospel — it is a fast static-analysis heuristic, not a full Lighthouse run — but the checks point you straight at the highest-leverage fixes for your stylesheet.
CSS architecture guide
As a project grows, the hardest problem in CSS is not writing styles but keeping them maintainable — avoiding the slow slide into a tangle of overrides, surprise side-effects and ever-climbing specificity. A deliberate architecture keeps styles predictable, and the tool's maintainability score rewards exactly the habits that good architectures encourage: consistent tokens, a tight specificity spread and a coherent structure.
BEM (Block, Element, Modifier) is the most widely adopted naming methodology. A block is a standalone component (card), an element is a part of it (card__title), and a modifier is a variant (card--featured). Because everything is a single class, BEM keeps specificity flat and uniform — every rule is one class deep — which is precisely why BEM-styled CSS tends to score well on both quality and maintainability. The cost is verbose class names, but the payoff is styles you can read and override without surprises.
Utility-first CSS, popularised by Tailwind, takes the opposite approach: tiny single-purpose classes (flex, pt-4, text-center) composed directly in the markup. There is almost no bespoke CSS to maintain, specificity is uniformly low, and a build-time purge ships only the utilities you actually use. ITCSS (Inverted Triangle CSS) instead organises a stylesheet into layers of increasing specificity — settings, tools, generic, elements, objects, components, utilities — so the cascade flows in one direction and overrides are intentional rather than accidental.
Underpinning all of these are design tokens expressed as CSS custom properties — --brand, --space, --radius — which centralise the values that would otherwise be scattered across hundreds of rules. Tokens make theming trivial, keep colours and spacing consistent, and shrink the number of unique values in a sheet (something the analyzer reports directly). Whichever methodology you choose, a consistent naming conventionand a shallow, flat structure matter more than the specific letters: the goal is CSS where you can predict what a selector does and change it without fear. The tool's specificity and variable analysis exists to keep you honest about that.
CSS specificity explained
Specificity is the weight the browser assigns to a selector when deciding which rule wins for a given element. When two rules set the same property, the more specific selector takes precedence regardless of source order. Understanding it is the single most important skill for writing CSS that behaves predictably — and it is why the tool computes the specificity of every selector and surfaces your highest ones in the Analyze tab.
Specificity is counted as a three-part tuple, written (a, b, c). The first number a counts ID selectors; b counts classes, attribute selectors and pseudo-classes; and c counts type (element) selectors and pseudo-elements. The tuple is compared left to right — a single ID outranks any number of classes, and a single class outranks any number of element selectors — so a selector like #nav .item a has specificity (1,1,1), while a plain a is only (0,0,1). Inline styles sit above all of them, and !important escapes the system entirely, which is exactly why it causes trouble. The tool collapses the tuple into a single comparable score so you can sort selectors at a glance.
| Selector | Specificity (a,b,c) | Notes |
|---|---|---|
| a | (0,0,1) | One element selector — easy to override |
| .btn | (0,1,0) | A single class — the maintainable baseline |
| .nav a:hover | (0,2,1) | Class + pseudo-class + element |
| #app .item | (1,1,0) | One ID outranks any stack of classes |
| #app .sidebar nav a.active | (1,2,2) | High — hard to override without !important |
| button[disabled] | (0,1,1) | Attribute selector counts as a class |
High specificity hurts because it forces an arms race. Once a rule is anchored to an ID or a deep descendant chain, the only way to override it is an even more specific selector — or the !importantsledgehammer — and each escalation makes the next override harder. This is “specificity debt”: brittle styles where a small change requires hunting for the one rule that is winning. The tool's specificity analyzer reports your maximum and average specificity and lists the top offenders, so you can flatten them — replacing IDs with classes and shortening descendant chains — toward a low, uniform specificity that makes the whole stylesheet predictable.
The spread between your maximum and average specificity is just as telling as the peak itself. A small spread means your selectors are uniform — most rules carry roughly the same weight, so the cascade resolves by source order the way it was designed to, and overrides are intentional. A large spread signals a few outlier selectors towering over the rest, the classic precursor to !important creep. That is why the maintainability score grades the spread directly and the analyzer lists your top twelve selectors by score: the fix is almost never to add weight but to remove it, rewriting the outliers as flat, single-class rules so the whole sheet settles into a narrow, predictable band. Methodologies like BEM exist precisely to enforce that uniformity by construction, and running your CSS through the analyzer is the fastest way to see whether yours actually achieves it.
Responsive CSS strategies
Responsive design adapts a single stylesheet to phones, tablets and desktops, and the way you structure that adaptation has a large bearing on both maintainability and size. The analyzer counts your media-query blocks and lists the distinct breakpoints in use, so you can spot duplication and inconsistency before it sprawls across the codebase.
Mobile-first is the recommended default: write the base styles for the smallest screen, then layer enhancements with min-width media queries as the viewport grows. This keeps the base rules lean (small screens need the least), ensures the most constrained devices download the least overriding CSS, and produces a stylesheet that reads as a progressive set of additions rather than a pile of desktop styles being clawed back. The alternative, desktop-first with max-width queries, tends to accumulate more overrides.
Drive your breakpoints from a small, named set of values rather than scattering magic numbers. While media-query conditions themselves cannot read custom properties, you can centralise breakpoints as preprocessor variables or design tokens and reference them consistently — so every 768px means the same thing and changing the set is a one-line edit. The analyzer surfaces every distinct breakpoint string it sees, which makes accidental near-duplicates (767px here, 768px there) immediately obvious so you can consolidate them.
Container queries are the modern leap forward: instead of responding to the viewport, a component responds to the size of its own container, so a card can lay itself out one way in a wide sidebar and another in a narrow column without knowing anything about the page. This makes truly reusable components possible and reduces the number of global breakpoints you need. Combine mobile-first base styles, a small set of consistent breakpoints driven from variables, and container queries for component-level adaptation, and your responsive CSS stays both small and sane — exactly the shape the media-query analyzer is designed to encourage by flagging duplicated or inconsistent breakpoints to consolidate.
CSS variables guide
CSS variables — formally custom properties — let you store a value once and reference it anywhere with the var() function. A declaration like --brand: #1166ff defines a token, and color: var(--brand) uses it. Unlike preprocessor variables that vanish at compile time, custom properties are live in the browser: they cascade, inherit and can be read and rewritten at runtime, which makes them the backbone of modern theming. The analyzer counts how many you declare versus how many you actually use, so you always know the health of your token system.
Theming is the headline use case. Declare your tokens on :root for the default theme, then override the same names inside a .theme-dark block or under a prefers-color-scheme media query, and every rule that reads those variables updates automatically — no duplicated rule sets, no JavaScript required. Because variables inherit, you can even scope a token to a subtree, letting one component carry its own accent colour without affecting anything outside it.
Fallbacks make variables robust: var(--brand, #1166ff) supplies a default if the token is undefined, so a missing or mistyped variable degrades gracefully instead of leaving a property unset. Scoping follows the cascade — a variable declared on an element is available to that element and its descendants — which lets you keep global design tokens on :root while defining component-local values lower down, keeping the global namespace clean.
The maintainability score rewards consistent variable usage because tokens are what keep colours and spacing coherent across a large codebase: a handful of named values is far easier to evolve than the same hex code copy-pasted into two hundred rules. The flip side is dead tokens. As a design system grows, variables get declared and later abandoned, and they linger as confusing noise. The tool's unused-variable detection compares every declared custom property against every var() reference and lists the ones that are never used, so you can delete them with confidence and keep your token palette lean and meaningful.
Modern CSS optimization techniques
Beyond stripping whitespace, modern CSS offers ways to write less code in the first place — and the leanest stylesheets lean on these features rather than fighting them. Many of the savings come from letting the language do work you would otherwise write out by hand.
- Logical properties replace four physical variants with one direction-aware declaration:
margin-inlineandpadding-blockhandle both left/right and top/bottom while also adapting to right-to-left languages, so you write fewer rules and get internationalisation for free. - clamp() collapses an entire set of breakpoint overrides into a single fluid declaration.
font-size: clamp(1rem, 2.5vw, 1.5rem)scales smoothly between a minimum and maximum without any media queries, removing whole blocks of responsive CSS. - Colour shortening is automatic here: six-digit hex collapses to three where possible (
#ffffff → #fff), hex is lowercased, and with the colour option on,rgb()/rgba()values convert to the shorter hex equivalent. - Shorthand properties fold related declarations into one:
margin,padding,font,backgroundandbordereach replace several longhand lines, shrinking the source and clarifying intent. - Cascade layers and container queries let you manage specificity and component-level responsiveness with intent rather than accident — layers make override order explicit, and container queries reduce the count of global breakpoints you need.
The biggest single win, though, is removing dead CSS — rules that no longer match anything on the page. A standalone minifier cannot detect this on its own, because knowing whether a selector is used requires seeing the live HTML it might match. The right workflow is to find unused rules with a coverage toolsuch as Chrome DevTools' Coverage panel, remove them with PurgeCSSor your framework's built-in purge, and only then minify what remains. The tool supports this by flagging the static signals it can see — empty rules, exact-duplicate declarations and unused custom properties — and by shrinking the surviving CSS to its smallest valid form once the dead weight is gone.
It is worth being precise about what is safe to automate and what is not. Shortening colours, removing zero units, dropping the trailing semicolon and collapsing whitespace are purely mechanical rewrites that can never change the rendered result, so they run by default. Merging the declarations of two rules that happen to share an identical selector is subtler: it is usually safe, but it can reorder declarations relative to other rules in the cascade, so this tool leaves it off by default and labels it clearly. Removing dead selectors is riskier still without coverage data, because a selector that looks unused in one template may match content injected by JavaScript elsewhere — which is exactly why that step belongs to a coverage-aware purge tool rather than a blind minifier. Knowing where that line falls lets you minify aggressively where it is free and reach for the heavier tooling only where it genuinely pays off.
Core Web Vitals & CSS
Core Web Vitalsare Google's standardised, user-centric measurements of real-world page experience, and they feed directly into search ranking. Three are the headline metrics — LCP, CLS and INP — supported by two diagnostics, FCP and TTFB. Because CSS is render-blocking and drives layout, it has a direct hand in every one of them. The Web Vitals tab inspects your stylesheet for the patterns that commonly hurt each metric and returns targeted recommendations, so you fix problems at the source rather than guessing.
| Metric | Good threshold | CSS-level fix |
|---|---|---|
| LCP | ≤ 2.5 s | Inline critical CSS; drop @import; preload fonts |
| CLS | ≤ 0.1 | Reserve space with aspect-ratio; use font-display |
| INP | ≤ 200 ms | Animate transform/opacity; flatten specificity |
| FCP | ≤ 1.8 s | Minify & compress CSS; eliminate render-blocking |
| TTFB | ≤ 0.8 s | Cache CSS at the edge with long max-age & hashing |
LCP (Largest Contentful Paint) measures how long the largest above-the-fold element takes to render. At the CSS level you help it by inlining critical styles, removing every render-blocking @import, and preloading the web fonts your CSS references so text paints without delay. CLS (Cumulative Layout Shift) quantifies unexpected movement of content as the page loads; the CSS fixes are reserving space with width/height or aspect-ratio and using font-display: swap with size-adjust so swapping fonts does not reflow the layout.
INP (Interaction to Next Paint) captures overall responsiveness — animating layout-affecting properties forces expensive reflows, so prefer GPU-composited transform and opacity transitions and keep selector specificity flat so style recalculation stays cheap. FCP (First Contentful Paint) marks the first moment any content appears, and is the metric minification most directly improves — fewer bytes paint sooner, so minify and compress and inline only what the first view needs. TTFB (Time to First Byte) reflects server and network latency before the stylesheet even starts, best addressed by caching static CSS at the edge with a long max-age and content hashing.
CSS framework optimization
CSS frameworks ship a great deal of CSS so that you do not have to write it — but most pages use only a fraction of what arrives, and the unused remainder is pure weight on the critical path. The biggest performance win with any framework is therefore not minification but removing what you never use, and each framework has its own mechanism. The tool's framework detector scans your CSS for tell-tale patterns and returns a confidence score with framework-specific tips so you know which lever to pull.
Tailwind CSS generates utilities on demand. With its JIT engine and content-based purge configured correctly, only the classes that actually appear in your markup are emitted, which turns a multi-megabyte theoretical surface into a few kilobytes of real CSS — by far the largest saving available. The detector recognises Tailwind by its --tw- variables and utility patterns and reminds you to keep purge scoped to every template path.
- Bootstrap — import only the SCSS modules you use rather than the full bundle, and drop unused grid tiers and components. The detector spots Bootstrap by its grid, button and navbar classes and suggests a modular import.
- Bulma — import individual modules instead of the whole framework; the detector keys off its
is-andhas-modifier classes. - Foundation — use a custom build that includes only the components you need, recognised by its grid and cell classes.
- Material — tree-shake components and import per-component styles, detected via the
mat-andmdc-prefixes.
Whichever framework you use, the workflow is the same: purge unused styles at build time, then minify the surviving CSS here to strip the remaining whitespace and comments and shorten values, and serve it compressed from a CDN. This tool covers the CSS slice of that pipeline end to end, all client-side. You can minify with granular, conservative-by-default options and beautify minified or machine-generated CSS back into readable rules. You can analyze structure — rules, selectors, declarations, media queries, keyframes and colours — and validate braces, strings and empty rules. On top of that sit the scores: quality, maintainability and performance grades out of 100, plus dedicated specificity, variable and media-query analysis, a framework detector, a sandboxed live preview at desktop, tablet and mobile widths, CSS↔SCSS and JSON conversion, and Core Web Vitals guidance with concrete fixes for each metric. Everything runs 100% in your browser — no uploads, no sign-up, no limits — so it is equally suited to confidential design systems and quick one-off optimisations alike.
Frequently asked questions
CSS minification removes characters a browser does not need to apply styles — comments, whitespace, the final semicolon in a block, and redundant units — and rewrites values into their shortest equivalent form (for example #ffffff becomes #fff). The styling is identical; the file is just smaller and faster to download and parse. This tool minifies entirely in your browser, so your CSS is never uploaded.
Paste, type, upload or drag-and-drop your CSS into the editor and the minified output appears instantly with the exact bytes and percentage saved. Toggle options — remove comments, shorten hex colors, drop 0 units, merge duplicate properties — then copy or download the result. Everything runs locally.
Yes. Smaller stylesheets transfer faster and the browser parses them sooner, improving First Contentful Paint and Largest Contentful Paint — especially on mobile. Because CSS is render-blocking by default, every byte you remove can directly shorten the time before the page paints. The benefit compounds with gzip/Brotli compression and a CDN.
With safe, default settings, no. This minifier preserves the meaning of every rule — it only removes insignificant whitespace and comments and rewrites values to equivalent shorter forms. It keeps !important, custom properties and at-rules intact. The one optimization that can occasionally affect the cascade — merging duplicate selectors — is off by default and clearly labelled, so production output stays correct.
Typically 10–60% before gzip, depending on how much whitespace, comments and verbose values the source contains. Framework or hand-written CSS with heavy formatting compresses the most. The tool shows the precise bytes and percentage saved for your specific input in real time.
Minification removes redundant characters from the source text. Compression (gzip or Brotli) is a server-side byte-level encoding the browser transparently decompresses. They are complementary: minify to remove redundancy, then let the server compress. Minified CSS also compresses slightly better because there is less to encode.
Yes. The Beautify tab re-indents minified or messy CSS into clean, readable rules with your chosen indentation, putting each declaration on its own line. It is the inverse of minifying — ideal for inspecting production CSS or tidying copied snippets before editing.
Remove comments, remove empty rules, remove exact duplicate declarations, merge duplicate properties (keep last), optionally merge duplicate selectors, shorten hex colors (#aabbcc → #abc), optionally compress rgb()/rgba() to hex, and strip unnecessary units (0px → 0). Each is a toggle, so you control exactly what changes.
Yes. Six-digit hex colors collapse to three digits where possible (#ffffff → #fff), hex is lowercased, and with the color option on, rgb()/rgba() values convert to hex. Length and percentage zeros lose their unit (0px → 0) and leading zeros are removed (0.5 → .5). Time units like 0s are intentionally left untouched for safety.
It reports total rules, selectors, declarations and unique properties; counts of media queries, keyframes, @font-face and @import; declared vs used CSS variables; !important and ID-selector usage; unique colors; maximum and average specificity; nesting depth; the highest-specificity selectors; and the file size, characters and lines. It is a complete structural X-ray of any stylesheet.
A 0–100 grade (A–F) summarising how clean and robust your CSS is. It weighs !important usage, ID selectors, empty rules, unused variables, maximum specificity and nesting depth. A high score means flat, low-specificity, maintainable CSS; a low score flags the specific issues dragging it down with suggested fixes.
A 0–100 measure of how easy the stylesheet is to evolve. It rewards consistent use of CSS variables (design tokens), a tight specificity spread, sensible declarations-per-rule, a manageable number of unique colors and a coherent media-query strategy. It complements the quality score by focusing on long-term health rather than correctness.
Specificity is the weight the browser gives a selector when deciding which rule wins for an element. It is counted as (IDs, classes/attributes/pseudo-classes, type/pseudo-elements). A higher tuple wins. For example #nav .item a has specificity (1,1,1). High specificity forces !important hacks and makes overrides painful — the Analyze tab lists your highest-specificity selectors so you can flatten them.
It computes the specificity of every selector and surfaces the most specific ones, plus your maximum and average. Selectors with very high specificity (multiple IDs, deep descendant chains) are hard to override and signal architectural debt. Lowering and flattening them — using classes and a shallow structure — makes CSS predictable and removes the need for !important.
Truly detecting unused CSS requires knowing which selectors match your live HTML, which a standalone minifier cannot see. This tool flags the static signals it can — empty rules, duplicate declarations and unused CSS variables (declared but never referenced with var()) — and you remove the rest with a coverage tool (Chrome DevTools Coverage, PurgeCSS) wired to your pages. Minifying afterwards shrinks what remains.
Yes. Exact duplicate declarations are removed, and with “merge duplicate properties” the last value of each property is kept (matching the cascade). You can optionally merge rules that share an identical selector. The analyzer also reports duplicate-leaning patterns so you can refactor by hand where automatic merging would be unsafe.
Yes. The analyzer counts media-query blocks and lists the distinct breakpoints in use, so you can spot duplicated or inconsistent breakpoints and consolidate them. Consistent breakpoints (ideally driven by variables) make responsive CSS far easier to maintain.
Yes. It counts variables declared (custom properties) versus actually used via var(), and flags any that are declared but never referenced so you can delete dead tokens. Healthy variable usage is also rewarded in the maintainability score because tokens drive theming and consistency.
Yes. The framework detector scans for tell-tale patterns — Tailwind utility classes and --tw- variables, Bootstrap grid/button classes, Bulma is-/has- modifiers, Foundation grid classes and Material mat-/mdc- prefixes — and returns a confidence score with framework-specific optimization tips (such as purging unused Tailwind utilities or importing only the Bootstrap modules you use).
Minify and compress CSS, inline critical above-the-fold styles and defer the rest to improve FCP and LCP; reserve space with width/height or aspect-ratio and use font-display to avoid layout shift (CLS); and prefer GPU-composited transform/opacity transitions to keep interactions responsive (INP). The Web Vitals tab inspects your CSS and gives targeted recommendations for each metric.
The minifier and analyzer accept these as input and process them best-effort as CSS — useful for compiled or simple preprocessor output. It does not compile SCSS/SASS/LESS (that needs the respective compiler); for production you should compile to CSS first, then minify. The tool also offers a CSS → SCSS transform that nests related selectors.
Yes. The Convert tab turns CSS into nested SCSS (grouping a base selector with its descendants and &-combined states), into a JSON object keyed by selector, and back from JSON to CSS. These help with refactoring, theming pipelines and storing styles as data.
Yes. It minifies and analyzes the generated CSS from Tailwind, Bootstrap and similar frameworks, and detects them to offer specific advice. For Tailwind, the biggest win is purging unused utilities at build time; for Bootstrap, importing only required modules. Minifying the final bundle then removes remaining whitespace and comments.
Yes. The output is valid CSS — it parses and renders identically to the source. Minification never introduces invalid syntax; it only removes optional characters and rewrites values to shorter but equivalent forms.
The Analyze tab checks for structural problems — unbalanced braces, unterminated strings or comments, empty rules — and surfaces quality signals like !important and ID-selector counts and unused variables, each with a suggested fix. It is a fast sanity check, not a full W3C property-level validator.
Yes. The Preview tab applies your CSS to a representative HTML snippet inside a sandboxed frame at desktop, tablet and mobile widths, so you can confirm components render correctly. Scripts are disabled in the preview for safety; only styling is applied.
Yes. Upload .css, .scss, .sass, .less or .txt files, drag-and-drop them, paste from the clipboard, or fetch CSS directly from a public URL (subject to the remote server’s CORS policy).
It handles multi-megabyte stylesheets comfortably in the browser, with files up to 100MB accepted. Parsing is a single pass and nothing is uploaded, so there is no network bottleneck. Very large framework bundles minify in well under a second.
Completely. All parsing, minifying, analysis and conversion run locally in your browser using JavaScript — your CSS is never uploaded, logged or stored remotely. That makes the tool safe for proprietary design systems and unreleased work.
Yes. It is 100% free with no sign-up, no usage limits and no watermarks. Minify, beautify, analyze, audit and convert as much CSS as you like.
For production sites, automate minification in your build (bundlers, PostCSS/cssnano and frameworks do this) so every deploy is optimised. This online tool is ideal for one-off files, snippets, learning, auditing third-party CSS, checking specificity and verifying what your build output should look like.
cssnano and CleanCSS are build-time libraries you wire into a pipeline. This tool gives you the same core minification instantly in the browser — no install — plus an analyzer, quality/maintainability/performance scores, specificity and framework analysis, Core Web Vitals guidance, a live preview and CSS↔SCSS/JSON conversion in one place.
Yes. Vendor-prefixed properties (-webkit-, -moz-) and at-rules (@media, @supports, @keyframes, @font-face, @import) are parsed and preserved. Minification compacts their whitespace without altering their behaviour. It does not add or remove prefixes — use Autoprefixer for that.
Yes. Comments beginning with /*! are treated as important (license) comments and preserved even when “remove comments” is on, matching the convention used by build tools. All other comments are stripped.
Specificity debt builds up when selectors become increasingly specific (IDs, long descendant chains, !important) to override earlier rules. It makes styles brittle and hard to change. The Analyze tab quantifies it through max/average specificity and the top-specificity list so you can refactor toward a flat, class-based architecture.
Yes. Because everything runs client-side, it keeps working without a connection once loaded, and the interface is fully responsive — the editor and output stack on small screens and the preview adapts to the selected device width.
First remove unused styles at build time (Tailwind purge/JIT, PurgeCSS, or importing only needed Bootstrap modules) — that is where the biggest savings are. Then minify the remaining CSS here to strip whitespace and comments and shorten values, split critical vs deferred CSS, and serve it compressed from a CDN.
Related Tools
Explore More Tools
Go ad-free & unlock power features
- Zero ads, faster focused workflow
- Upload 50MB+ files & batch process
- Priority AI type & schema generation