Unused CSS selector finder
Compare a stylesheet against a page of HTML and list the selectors that match nothing.
Unused CSS selector finder
Paste a stylesheet on one side and the HTML it styles on the other, and this tool lists every selector that doesn't match a single element on the page. It's a quick way to spot dead rules left behind after a redesign, a removed component, or months of copy-pasted CSS — the kind of bloat that's tedious to hunt down by eye in a file with hundreds of rules.
"Ignore pseudo-classes and pseudo-elements" compares a rule like .button:hover as plain .button, since a static HTML snapshot can't show hover or focus state; leave it off and the tool checks the ones it safely can — first-child, last-child, nth-child and not — against each element's real position. "Ignore selectors matching" takes a regular expression, or a plain text fragment as a fallback, to exclude classes a script toggles at runtime, such as anything starting with js- or is-active, so they're never flagged as dead. "Show HTML classes/IDs with no CSS rule" flips the comparison around, useful for catching typos in class names. "Include selectors inside @media" checks media-query rules the same way as the rest of the sheet, or skips them when off. Switch the output to "Cleaned CSS" to get the stylesheet back with every unused rule stripped out.
The comparison runs against the HTML structure as written — markup injected by a script after page load isn't in the pasted snapshot, so double-check before deleting a rule. Selectors combined with commas are checked individually, so a rule covering two classes at once is only removed once both are confirmed unused.
Everything happens in your browser: the CSS and HTML you paste are never uploaded anywhere. Copy the result, download it as a .txt file, or send it straight back into the input to run another pass.