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.
- Free, no account
- Results in under a minute
- Every script and stylesheet on the page
Example result:example-shop.hr
WordPress 6.8Sample shop · homepage · mobile Chrome · the same check you get for your own site
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)
| Metric | Value | Rating |
|---|---|---|
| First Contentful Paint | 0.8 s | good |
| Largest Contentful Paint | 0.8 s | good |
| Total Blocking Time | 0 ms | good |
| Cumulative Layout Shift | 0 | good |
| Speed Index | 4.3 s | needs work |
| Time to First Byte | 27 ms | good |
LCP element: <p>
Field (Core Web Vitals)
Filmstrip
0.4 s
0.8 s
1.2 s
1.6 s
2.0 s
2.4 s
2.8 s
3.2 s
Waterfall · 1 requests
- example.com/0 KB
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| File | Type | Size | Unused |
|---|---|---|---|
| example-shop.hr/assets/bundle.js | JS | 125 KB | 123 KB · 99% |
| example-shop.hr/assets/framework.css | CSS | 98 KB | 98 KB · 100% |
| example-shop.hr/assets/style.css?elementor=1 | CSS | 1 KB | 1 KB · 55% |
| example-shop.hr/assets/style.css | CSS | 1 KB | 1 KB · 55% |
| example-shop.hr/assets/style.css?woocommerce=1 | CSS | 1 KB | 1 KB · 55% |
| example-shop.hr/assets/jquery-1.12.4.min.js | JS | 1 KB | 1 KB · 12% |
| example-shop.hr/assets/app.js | JS | 1 KB | 1 KB · 0% |
| inline code in the page | JS | 1 KB | 1 KB · 0% |
| example-shop.hr/assets/app.js?gtm=1 | JS | 1 KB | 1 KB · 0% |
| example-shop.hr/assets/app.js?fbq=1 | JS | 1 KB | 1 KB · 0% |
| example-shop.hr/assets/app.js?hotjar=1 | JS | 1 KB | 1 KB · 0% |
What we found
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
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.
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.
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.
Related free tools
All 59 tools →Free, funded by the people who use it
No account, no paid plan. Donations keep it running.