Skip to content

Remove unused CSS and JavaScript: see what each page loads but never uses

See which unused CSS and JavaScript to remove. Chromium code coverage shows, file by file, how much of each script and stylesheet the page actually used.

Device
  • Free, no account
  • Results in under a minute
  • Every script and stylesheet on the page

Example result:example-shop.hr

WordPress 6.8

Sample shop · homepage · mobile Chrome · the same check you get for your own site

Run it on your site
Unused CSS/JS checker
5 passed · 0 failed · 0 warnings. Lighthouse did not flag it, but 98% of the JavaScript and 100% of the CSS never ran during load. The files below show where to trim.The score counts only the 5 checks this tool shows, not the whole Speed score of the full report.

Lab data from Google PageSpeed Insights (Lighthouse 12.8.2) · desktop score 100 · no field data: not enough real Chrome users visit this page yet

Lab (Lighthouse 12.8.2)

Lab metrics
MetricValueRating
First Contentful Paint0.8 sgood
Largest Contentful Paint0.8 sgood
Total Blocking Time0 msgood
Cumulative Layout Shift0good
Speed Index4.3 sneeds work
Time to First Byte27 msgood

LCP element: <p>

Field (Core Web Vitals)

No field data. Google publishes Core Web Vitals only for pages with enough Chrome visitors; the lab numbers are the best estimate for now.

Filmstrip

  1. Page at 0.4 s0.4 s
  2. Page at 0.8 s0.8 s
  3. Page at 1.2 s1.2 s
  4. Page at 1.6 s1.6 s
  5. Page at 2.0 s2.0 s
  6. Page at 2.4 s2.4 s
  7. Page at 2.8 s2.8 s
  8. Page at 3.2 s3.2 s

Waterfall · 1 requests

  1. example.com/0 KB
document render-blocking large image
JavaScript · 7 files98% unused123 KB of 126 KB never ran during load
CSS · 4 files100% unused98 KB of 99 KB never matched during load

These numbers count every byte that went unused while the page loaded in Chromium, on this page only. The findings below come from Lighthouse, which flags unused code only when removing it would save noticeable load time, so small or late files can pass there and still show up here.

Files by unused code

11 largest · 0 third-party · decoded sizes
Scripts and stylesheets with their size and how much of each was never used
FileTypeSizeUnused
example-shop.hr/assets/bundle.jsJS125 KB123 KB · 99%
example-shop.hr/assets/framework.cssCSS98 KB98 KB · 100%
example-shop.hr/assets/style.css?elementor=1CSS1 KB1 KB · 55%
example-shop.hr/assets/style.cssCSS1 KB1 KB · 55%
example-shop.hr/assets/style.css?woocommerce=1CSS1 KB1 KB · 55%
example-shop.hr/assets/jquery-1.12.4.min.jsJS1 KB1 KB · 12%
example-shop.hr/assets/app.jsJS1 KB1 KB · 0%
inline code in the pageJS1 KB1 KB · 0%
example-shop.hr/assets/app.js?gtm=1JS1 KB1 KB · 0%
example-shop.hr/assets/app.js?fbq=1JS1 KB1 KB · 0%
example-shop.hr/assets/app.js?hotjar=1JS1 KB1 KB · 0%

What we found

0 failed0 warnings5 passed
Show 5 passed checks

How much unused CSS and JavaScript your page loads

Chromium code coverage for every file, plus the time Google estimates you would save.

  • Unused JavaScript

    Measures JavaScript that downloads but never runs, which costs time and data on phones.

  • Unused CSS

    Measures CSS that downloads but is never used on the page, delaying the first render.

  • Third-party code weight

    Measures the size and blocking time of tags, widgets and embeds from other companies.

  • Render-blocking files

    Finds stylesheets and scripts in the head that stop the browser drawing anything until they load.

  • Main-thread work

    Total time the browser spends parsing and running your code, when it cannot respond to visitors.

  • Long main-thread tasks

    Finds scripts that freeze the page for over 50 ms and make taps and scrolls feel unresponsive.

  • Page builder weight

    Measures how much of the page's CSS and JavaScript comes from the page builder.

  • WordPress plugin weight

    Measures how much each plugin adds to the page, since heavy plugins load on every page.

Show 4 more checks
  • Main-thread work

    Total time the browser spends parsing and running your code, when it cannot respond to visitors.

  • Long main-thread tasks

    Finds scripts that freeze the page for over 50 ms and make taps and scrolls feel unresponsive.

  • Page builder weight

    Measures how much of the page's CSS and JavaScript comes from the page builder.

  • WordPress plugin weight

    Measures how much each plugin adds to the page, since heavy plugins load on every page.

How we find unused CSS and JavaScript

  1. Load with coverage on

    The page loads in Chromium with the browser's own code coverage switched on, the same tool the Coverage tab in Chrome DevTools uses.

  2. Count what ran

    For every script we count the bytes of functions that ran; for every stylesheet the bytes of rules that matched something on the page. Inline code counts too.

  3. Rank the waste

    Files are listed by unused bytes, first party and third party apart, next to Google's estimate of how many milliseconds removing it would save.

Coverage covers one page load without clicks. Code for menus, forms, checkout or other pages shows as unused here even though it is needed later, so treat big shares as a hint to split code, not to delete it.

Questions about unused CSS and JavaScript

How do I find unused CSS and JavaScript on a page?

Enter the page above: Chromium loads it with code coverage on and lists every script and stylesheet by unused bytes, first party and third party apart, with Google's estimate of the time you would save. In Chrome itself, open developer tools, press Ctrl+Shift+P (Cmd+Shift+P on a Mac), run Show Coverage and reload the page.

Why is so much of my CSS unused?

Because most sites ship one stylesheet for every page: the rules for checkout, the blog, sliders and every theme option load on the home page too. Frameworks such as Bootstrap and page builders add many rules a page never uses. It matters most when the file blocks rendering, so inline the CSS the first screen needs and load or trim the rest.

Does unused JavaScript slow down my page?

Yes, more than unused CSS byte for byte, because the browser downloads, parses and compiles every script while the main thread is busy. That delays the first render when scripts block it, and makes the page slower to respond to taps, which shows in INP. Load scripts with defer, split them by page and drop libraries you no longer use.

How do I remove unused CSS and JavaScript in WordPress?

Most unused code on a WordPress page comes from plugins and page builders that load their files everywhere. Use your cache or performance plugin's options to delay JavaScript and remove unused CSS, turn on your builder's own asset-loading settings, and unload plugin files on pages that do not need them. The report also shows each plugin's cost and the builder's share.

Can I just delete the unused code?

Rarely all of it. Most code unused on one page is used elsewhere: on another template, after a click, in the checkout. The fix is to load each piece only where it is needed. A theme that ships one giant stylesheet for every page is the classic case: 80 to 95 percent unused on any single page is normal, and splitting it often saves more than any other speed change.

Why do your numbers differ from Chrome DevTools?

We use the same coverage data, but count characters of decoded code during load and settle only, on one page load without clicks. The Coverage tab in DevTools keeps counting while you click around, so its unused share goes down as you use the page. Both are right; ours shows what the first visit downloads but does not need.

What does the third-party column mean?

Files from another company's domain, such as tag managers, chat widgets, video embeds and ad scripts. You cannot shrink them yourself, only decide whether they load and when. Delay the ones visitors rarely use until they interact, and drop those nobody looks at; they often cost more main-thread time than your own code.

All 59 tools →

Free, funded by the people who use it

No account, no paid plan. Donations keep it running.

Chip in