CSS Purge Estimator
Compare CSS selectors against your markup to estimate what may be unused before purging.
Estimate purge impact
Compare compiled CSS against real template content, then keep dynamic selectors in a safelist before pruning.
Coverage
Quick totals for the content you pasted and the selectors that survived the scan.
Match rate
83%
5 of 6 selectors are present in your content
Tokens found
7 classes · 1 ids · 8 tags
Parsed from the HTML / template input
Selector scan
6 selectors parsed
- Unused.badge-new::before
tokens:.badge-new
- Used:rootSafe-listed
Safelisted selector
tokens:
- Used.btn-primary
Found in class attribute: btn-primary
tokens:.btn-primary
- Used.card:hover .card-title
Found in class attribute: card
tokens:.card, .card-title
- Used#hero-banner
Found in id attribute: hero-banner
tokens:#hero-banner
- Used.nav-link[data-active="true"]
Found in class attribute: nav-link
tokens:.nav-link
Documentation
CSS Purge Estimator
About this tool
CSS Purge Estimator compares compiled CSS against representative markup and shows which selectors appear used or unused. Use it before removing selectors from a stylesheet.
Inputs and behavior
Paste compiled CSS and representative HTML or template content.
Safelist entries can be class names or raw selectors. Dynamic selectors should appear in the sample content or be added to the safelist.
Gotchas
Use built CSS, not source fragments, so the estimate matches what ships.
Unused results are estimates. Review them before deleting anything, especially when classes are created by JavaScript or CMS content.
Key use cases
- -Review purge coverage before shipping a config.
- -Check classes and IDs against sample templates.
- -Build a safelist for dynamic selectors.
- -Inspect possible unused CSS before deleting it.