bookmarklet.one

Unused CSS Detector Bookmarklet

Find unused CSS rules on any page: see the unused percentage per stylesheet and a list of selectors that match nothing. Free bookmarklet, no extension.

Unused CSS Detector
← Drag this button to your bookmarks bar.Click it here to try it on this page first.

On a phone? Use Copy code, then save it as a bookmark's URL — step-by-step guide.

Web Dev CSS PerformanceUpdated 2026-11-27Free · No extension · Runs locally

Unused CSS Detector checks every style rule the page can read and tests whether its selector matches anything in the current document. You get the overall share of unused rules, a breakdown per stylesheet and a filterable list of the selectors that matched nothing, with the stylesheet and any @media condition they belong to.

Unused CSS is one of the most common causes of render-blocking bloat, which hurts Largest Contentful Paint and Core Web Vitals. Themes and frameworks often ship thousands of rules for components a page never shows. This report tells you which files carry the most dead weight and gives you concrete selectors to review.

The tool handles state selectors sensibly: :hover, :focus, ::before and similar parts are stripped before testing, so a:hover counts as used when there are links. Rules inside media queries, supports and layer blocks are included. Cross-origin stylesheets cannot be read by scripts; they are listed as skipped instead of being silently ignored.

What it does

  • Walks all same-origin and inline stylesheets, including @media, @supports, @layer and @import rules
  • Tests each selector with querySelector, ignoring hover, focus and pseudo-element parts
  • Shows unused rules and percentage overall and per stylesheet
  • Filterable list of unused selectors with their stylesheet and media condition, plus Copy list
  • Lists skipped cross-origin stylesheets and selectors the browser could not test

How to install the Unused CSS Detector bookmarklet

  1. Show your bookmarks bar. Press Ctrl+Shift+B on Windows/Linux or Cmd+Shift+B on a Mac (Chrome, Edge, Brave, Firefox). In Safari choose View › Show Favorites Bar.
  2. Drag the blue button above onto the bar. That's it — the bookmark now holds the code.
  3. Open any website and click the bookmark to run it on that page. Click it again to close it.

Can't drag (phone, tablet, locked-down browser)? Copy the code below, create any bookmark, then edit it and paste the code as its URL. See how to add a bookmarklet in every browser.

How to use it

  1. Open the page in the state you want to test (open menus or modals first if you want them counted).
  2. Click Unused CSS Detector and wait a moment on very large sites.
  3. Check the per-sheet table to see which file has the most unused rules.
  4. Filter and copy the unused selectors, then confirm them on other templates before deleting anything.

Unused here does not mean safe to delete

The report covers one page in one state. Rules can be unused here but needed on another template, at another screen width, for logged-in users or for elements that JavaScript creates later, such as modals, dropdowns, toasts and validation messages. Run it on several key pages and combine the results before removing CSS. Coverage in Chrome DevTools measures the same thing over time while you interact. For cross-origin sheets (CDNs), test a copy of the page where the CSS is served from the same domain.

Bookmarklet code

This is the exact code inside the button above (9,080 characters). It runs only in your browser and sends nothing to us. Paste it into the Bookmarklet Decoder to read it formatted.

Frequently asked questions

Why are cross-origin stylesheets skipped?

Browsers block scripts from reading rules of stylesheets loaded from another domain without CORS, so no bookmarklet can analyze them.

Are hover and focus styles counted as unused?

No. State pseudo-classes and pseudo-elements are stripped before testing, so a:hover counts as used when the page has links.

Should I delete everything it reports?

No. Check other pages, breakpoints and dynamic states first, or use a build tool such as PurgeCSS with your full template list.

Related bookmarklets

List every stylesheet on a page, linked, inline and adopted, with rule counts and sizes. Copy, view or download the CSS.…

Disable all CSS on a page, stylesheets, style blocks and inline styles, to check its raw HTML structure. Click again to…

Count DOM elements, nodes and nesting depth on any page, with a sortable per-tag table and Lighthouse DOM-size…

Free page speed checker bookmarklet: shows TTFB, FCP, LCP, CLS and page weight from your own browser, then opens…