Unused CSS Finder: Selectors Not Matched by Your HTML
Finds CSS rules whose selectors match nothing in the HTML you paste and reports the bytes they take.
Use the tool
Why this tool exists
Old stylesheets collect rules for pages that no longer exist. Removing them shrinks the file and the render-blocking cost.
The tool tests each selector against your HTML with its own matcher, treats state selectors such as :hover by their base element, and keeps rules it cannot test. It cannot see classes added by scripts, so run it on every template that uses the file and review the list before you delete anything.
How to use it
- Paste your page HTML (join several pages if the CSS is shared).
- Paste the stylesheet.
- Read the unused list and byte total.
- Switch the output to get the CSS without the unused rules.
Frequently asked questions
Is it safe to delete what it lists?
Not blindly. Scripts add classes at run time, and other pages may use the rule.
What is "not tested"?
Selectors with pseudo-classes it does not support, such as :has() or :nth-child().
Are media queries checked?
Yes, the rules inside are checked individually.
Is anything sent out?
No.