Paste your HTML and CSS to instantly find unused selectors, calculate byte savings, and download a cleaned stylesheet. Client-side — no upload, no login.
Paste your HTML in the left pane and CSS in the right pane. Click Analyze to see which CSS selectors are used and which are safe to remove.
Multiple approaches to identifying and removing unused CSS — from this tool for quick checks to automated pipeline solutions.
Paste your HTML source in the left pane and your CSS in the right pane. Click Analyze. The tool parses every selector from the CSS and checks whether it could match any element in the HTML. Unused selectors are listed with their approximate byte cost. Download the cleaned CSS directly or copy it to clipboard.
For best results: include the full page HTML (not a partial), and paste all CSS files concatenated into the CSS pane. The tool handles class selectors (.btn), ID selectors (#nav), element selectors (h1), and attribute selectors ([type="text"]).
For live sites: open Chrome DevTools (F12) → click the three-dot menu → More Tools → Coverage. Click the record button and interact with your page. The Coverage tab shows the exact % of each CSS file that was used during your session. This is the most accurate method since it measures actual runtime usage including dynamic JavaScript-injected classes.
PurgeCSS is a Node.js tool that analyzes HTML, JS, and template files to remove unused CSS from your build output. It integrates with Webpack, Vite, and PostCSS. Ideal for production builds — eliminates unused CSS from Tailwind, Bootstrap, or any CSS framework before deployment. Run as part of your CI/CD pipeline for zero-unused-CSS production builds.
No static analyzer can catch: CSS classes added dynamically by JavaScript at runtime (e.g., classList.add('active')), pseudo-classes like :hover and :focus (considered used if the base selector matches), @keyframes used by animations, or media-query-scoped styles that only apply at certain screen widths. Always manually review results before deleting CSS in production.
The main tools for finding and removing unused CSS — choose based on your workflow.
| Tool | Type | Detects JS Classes | Requires Install | Cost | Best For |
|---|---|---|---|---|---|
| This Tool | Browser (paste) | ❌ Static only | No | Free | Quick single-page check |
| Chrome Coverage | Browser DevTools | ✅ Yes (runtime) | No (built-in) | Free | Accurate live analysis |
| PurgeCSS | CLI / Build plugin | ✅ With config | npm install | Free | Production builds, CI/CD |
| UnusedCSS.com | SaaS (URL crawl) | ✅ Yes (rendering) | No | Free/Paid | Full site audits |
| VS Code Extension | IDE | ⚠️ Partial | VS Code | Free | Real-time editing |
| Lighthouse | Browser audit | ✅ Yes (rendering) | No (built-in) | Free | Core Web Vitals audit |