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.

:root
html
body
*
*::before
*::after

Safelist protects selectors even when they are missing in the content. Use this for JS-driven states, dynamic routes, or Tailwind utilities you inject at runtime.

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
    :root
    Safe-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

Full Docs

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.

info

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.

tips_and_updates

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.

FAQ