Audit and Clean Up Unused CSS & Javascript in Webflow

Written by Andy Dao, CEO
Last updated:
August 21, 2025

Why Unused CSS and JS Are Killing Your Webflow Performance

How unused CSS and JS create page bloat that harms SEO, conversions, and developer sanity.
Slow-loading Webflow sites hurt more than your user experience—they put your organic rankings, conversions, and even your team’s sanity at risk. Page bloat from unused CSS and Javascript is one of the fastest-growing headaches for complex, legacy, or heavily customized Webflow projects.
Consider this: Every 0.1s increase in load time reduces conversion rates by up to 7% (Google). Code bloat quietly compounds over dozens of launches, quick fixes, and product updates. Before you know it, your “clean” project is sluggish, fragile, and impossible to maintain.
This guide shows you how to audit and clean up unused CSS and Javascript in complex Webflow projects—step by step, with the exact tools and checklists proven to work at scale for SaaS teams.
Understanding Unused CSS & Javascript in Webflow
Unused CSS and Javascript are code blocks shipped with your site but never run in the user’s browser, often leftover from old features, deprecated pages, or external scripts. They’re digital dead weight.
Webflow makes it easy to build visually, but its flexibility means unused styles and scripts build up fast:
- Global styles from outdated components linger in your CSS bundle.
- Interactions and custom code embeds often stay hidden in large projects.
- Third-party integrations can quietly add entire libraries you no longer use.
As your project grows, every small fix, template, and experiment can leave ghosts in your codebase. Unlike hand-coded sites, Webflow doesn’t automatically prune these extras—or flag them as unused.
Why is Webflow especially prone? Its visual-first workflow encourages rapid iteration, but most designers and marketers rarely audit the underlying CSS/JS. Over time, your published codebase becomes a tangle of active and abandoned assets.
The Business Impact: Real Data on Performance, SEO, and User Experience

Typical performance improvements after trimming unused code: lower blocking time, smaller page size, higher Lighthouse scores.
If you’re weighing whether to tackle code bloat, the numbers are clear: Unused code directly impacts your KPIs.
- Sites reducing unused CSS/JS saw median load times drop by 30–60% (web.dev).
- Lighthouse audits: Every 500KB of waste can knock your performance score down by 10–20 points.
- Faster loads translate to higher Google rankings, better Core Web Vitals, and a tangible lift in form-fills or demo signups.
Improvement | Before Cleanup | After Cleanup |
---|---|---|
Total Blocking Time | 1,200 ms | 350 ms |
PageSize (CSS+JS) | 1.15 MB | 420 KB |
Lighthouse Performance Score | 54 | 94 |
Bottom line: Cleaning up unused code isn’t just for speed geeks—it’s a business growth lever. You’ll improve SEO, reduce maintenance costs, and protect your user experience from hidden regressions.
Preparing for a Safe Audit: Backups and Versioning
Before making changes, safeguard your project. Never audit or remove code from your live Webflow site without a rollback plan.
-
Create a Webflow Backup:
- In the Designer, open the Project Settings > Backups tab.
- Click “Create Backup.” Name it with a clear date and reason (e.g., “Pre-CSS/JS Cleanup - May 2025”).
-
Export a Code Snapshot:
- Use Export Code to download an exact copy in case you need to compare or restore.
-
Set Up Staging/Test Publish:
- Use a Webflow staging domain (yourproject.webflow.io) to preview changes before going live.
- Alternatively, publish to a password-protected subdomain for QA/review.
Automated Tools: Finding Unused CSS/JS Code Clearly

Use a mix of DevTools, PurifyCSS/UnCSS, and Webflow Audit Panel to find low-hanging unused code.
For complex projects, start with automated tools to identify low-hanging fruit. Here are the best options for SaaS-scale Webflow codebases:
1. Chrome DevTools: Coverage Tab
-
How it works: Open DevTools (
Ctrl+Shift+I
orCmd+Opt+I
) > Run the page > Open the “Coverage” panel.
Click “Reload” — DevTools shows exactly how much of each CSS/JS file loads, and what’s unused (red segments). -
What to look for:
- Large percentage unused in key bundles (
.css
,.js
). - Identify code not touched during page load/normal interaction.
- Large percentage unused in key bundles (
2. PurifyCSS and UnCSS
- Best for: Exported Webflow code or advanced static audits.
-
How it works:
- Scan HTML files and output a “cleaned” CSS file with only used rules.
- Great for showing what can be safely trimmed before hosting off-Webflow or with custom builds.
3. Webflow’s Audit Panel
- Inside Designer: Click the lightning bolt (Audit) icon.
-
What it finds:
- Unused classes, interactions, assets.
- Doesn’t always catch custom embeds or code tied to dynamic content.
4. Online Scanners & Extensions
- PurifyCSS Online or Unused-CSS.com for simple visual reports.
- Caution: These are helpful for spot-checks, not full dynamic projects.
Tool | Best For | Limitations |
---|---|---|
Chrome DevTools | Quick in-browser audit, visual unused code review | Doesn't cover code on hidden/dynamic pages |
PurifyCSS/UnCSS | Thorough static site audit, prepping for export | Misses JS-injected styles, complex dynamic content |
Webflow Audit Panel | Quick Designer cleanup, finding unused classes | Limited to visual elements, misses embeds/custom code |
Manual Audit: Digging Deeper for Dynamic/Hidden Code
Automated tools miss plenty—especially custom code, dynamic embeds, and old template junk. A systematic manual audit is essential for advanced projects.
Audit Steps for Advanced Webflow Projects
-
Custom Code Embeds:
- Review every page’s “Add Custom Code” fields (before
</head>
and</body>
). - List every script by name and intended feature—mark what’s still needed.
- Review every page’s “Add Custom Code” fields (before
-
Interactions and Animations:
- Open the Interactions panel. Check triggers and targets: Are they used by published elements?
- Test if removing old triggers breaks anything.
-
Rarely-Used Pages/Templates:
- Scan CMS Collections and static pages. Are there templates that no longer exist but have lingering CSS/JS?
- Check for duplicated or legacy layouts.
-
Third-Party Integrations:
- Inventory all integrations (e.g., chat widgets, analytics, marketing tags).
- Ensure only active scripts are loaded. Sunset unused plugins.
Audit Area | Key Actions | Remove? |
---|---|---|
Custom code embeds | Scan per page, check in global settings | If feature retired |
Interactions | Review triggers, test in staging | If not attached to live content |
Templates/CMS pages | Delete old layouts, audit legacy code in CMS templates | If no longer in use |
Third-party scripts | Confirm active need and remove stale integrations | If unused |
Create a shared audit sheet. Mark each item as “Keep,” “Remove,” or “Test,” and review change impact in staging.
Cleaning Up Unused CSS in Webflow
With your audit complete, it’s time to remove unused CSS and clean up bloated styles for good. Webflow’s visual style system helps, but there’s more under the hood than most teams realize.
Step-by-Step: Clean Up Bloated CSS in Webflow
-
Use the Audit Panel:
- In Designer, open the Audit Panel (lightning bolt icon).
- Click through each flagged issue—Webflow highlights unused classes, interactions, and assets.
- Delete unused classes directly, one by one, or batch-select for removal.
-
Edit in Style Manager:
- Open the Style panel, sort by Unused or Unused in This Page.
- Delete, rename, or consolidate old classes. This trims your global CSS.
-
Review Global Styles:
- Audit Global Swatches, Typography, and reusable symbols. Remove color or font styles that are no longer referenced.
-
Clean Up Custom CSS Blocks:
- Check the
Custom Code
fields in both Site Settings and individual pages—remove old<style>
blocks. - Comment out deletions and test visually before permanent removal.
- Check the
-
Backup and Test:
- After bulk deletions, re-publish to staging and run a workflow test pass to spot regressions.
- Tip: Tackle unused CSS after significant content migrations, design refreshes, or template consolidations—these events create the most debris.
!important
in moderation. Remove it wherever possible during refactoring to keep your CSS maintainable.
Summary checklist for CSS cleanup:
- Delete unused classes from Audit Panel/Style Manager.
- Remove orphaned global color and font styles.
- Check and clean custom
<style>
blocks per page. - Test in staging—never live.
Cleaning Up Unused JS: Custom Code & Third-Party Scripts
Javascript bloat typically comes from third-party scripts and custom embeds. Delete unused Javascript in Webflow follows a clear workflow:
Where JS Lives in Webflow
- Site-wide custom code (Project Settings > Custom Code tabs)
- Page-level custom code (Page Settings > Before
</head>
and</body>
) - Custom HTML embeds (within page content)
- Linked third-party services (e.g., analytics, chat, A/B test tools, embeds)
Safe Removal Process
- Inventory All Scripts: Create a list. For each, identify: what is its purpose? Still used? Who owns it internally?
-
Test-Remove in Staging:
- Start by commenting out or removing one script at a time in a test environment.
- Regression test key features and integrations (forms, CTAs, analytics).
-
Use Feature Flags and Comments:
- If you’re unsure, wrap JS in
if (false) { ... }
or descriptive comments to “soft-disable” first.
- If you’re unsure, wrap JS in
-
Publish and Monitor:
- After removal, monitor critical conversions and error logs for at least 24–48 hours before removing permanently from production.
Key tip:
Prioritize scripts from legacy widgets (e.g., chat, popups, A/B split test) as these are usually the most forgotten and heaviest.
For custom blocks powering dynamic features, confirm if they’re used on any current page. If not, remove and retest.
Measuring Improvements: Before and After

Benchmark and share measurable wins—FCP, site weight, and Lighthouse scores make cleanup defensible.
After cleanup, quantify your impact—this helps show value and maintain stakeholder buy-in.
Here’s how to benchmark like a pro:
-
Google PageSpeed Insights
- Test key pages before/after. Note FCP (First Contentful Paint), TTI (Time to Interactive), and unused code flags.
-
Lighthouse Audits
- Run audits in DevTools (chrome) or on web.dev/measure/. Record the “Reduce unused CSS/JS” and “Resources” scores.
-
Compare total site weight (
.css
+.js
from DevTools Network tab) before and after. - Share results: Summarize key gains in a chart or table for your team/executives.
Metric | Before | After | Delta |
---|---|---|---|
First Contentful Paint (FCP) | 2.9s | 1.2s | -1.7s |
Total JS/CSS size | 900 KB | 300 KB | -67% |
Lighthouse Perf. Score | 65 | 97 | +32 |
Maintenance Workflow: Keeping Your Codebase Lean
Preventing code bloat is ongoing, not a one-time fix. Codebase hygiene is your leverage for performance and maintainability.
Monthly/Quarterly Audit Checklist
- Run Webflow Audit Panel and Style Manager for unused classes monthly.
- Review all custom code embeds and remove those tied to retired experiments or features.
- Inventory third-party scripts. Check active usage with your marketing/dev ops leads.
- Benchmark site speed and code weight with Lighthouse and PageSpeed Insights every quarter.
- Update your audit/change log after every major redesign or integration change.
Documentation + Collaboration Tips
- Document “component ownership” internally—track which teams own which third-party scripts and widgets.
- Add a changelog section in your team’s Notion/Confluence/Wiki for code removals and rationales.
- Regularly share performance wins and “bloat found/removed” stats in team updates.
Long-term win: Build code audits into your onboarding process and quarterly roadmaps. This is the difference between a scalable Webflow project and one that’s impossible to debug or scale.
Actionable Takeaways & Conclusion
- Audit your Webflow project for unused CSS and Javascript quarterly or after major updates.
- Start with automated tools (Webflow Audit Panel, Chrome DevTools) and follow up with a manual sweep (especially for custom code/embeds).
- Backup before any bulk cleanup—use staging domains for validation.
- Prioritize: Unused classes, legacy widgets, custom scripts, and global styles that linger from old designs.
- Measure impact—report on FCP, TTI, site weight, and Lighthouse scores to prove the business win.
Most Webflow teams accept code bloat as the “cost of scaling,” but with the right workflow, you can keep your site fast, resilient, and easy to maintain. Sharpen your audits, schedule routine checkups, and make performance optimization an ongoing habit—not an emergency project.
- Explore advanced Webflow performance strategies
- Review image optimization workflows
- Audit and reduce third-party scripts systematically