The internet consumes more electricity than some countries. Every website, every page view, every animation generates CO2 -- and most businesses do not even know it. An average website produces 1.76 grams of CO2 per page view. With 100,000 visitors per month, that is over 2 tons of CO2 per year -- equivalent to a round-trip flight from London to New York.
But here is the twist: more sustainable web design is not just good for the environment. It is good for business. Leaner code loads faster, optimized images save bandwidth, efficient hosting saves money. Sustainable web design and performance optimization are two sides of the same coin.
The Problem: Digital Emissions Are Growing
The digital sector accounts for approximately 3.7% of global greenhouse gas emissions -- comparable to the entire aviation industry. And while aviation emissions have plateaued, digital emissions are growing by 6% annually.
Where the emissions come from:
- Data centers (15%): Servers, cooling, infrastructure
- Network transmission (14%): Data traffic through cables, routers, mobile networks
- End devices (71%): Smartphones, laptops, tablets -- the largest share
What this means for websites:
The more data a website transfers, the more energy all three areas consume. A single page view on a typical website transfers an average of 2.3 MB of data. Well-optimized pages manage with under 500 KB -- an 80% reduction.
EU Regulation: Sustainability Is Becoming Mandatory
The EU is taking this topic increasingly seriously. Several regulations directly or indirectly affect web design:
- Corporate Sustainability Reporting Directive (CSRD): Large companies must report on their sustainability measures from 2025 -- including digital footprint.
- EU Taxonomy for Sustainable Activities: Defines which economic activities qualify as ecologically sustainable.
- Energy Efficiency Directive: Data centers must make their energy consumption transparent.
- Green Claims Directive: Companies may not make unsubstantiated sustainability claims -- including on their websites.
What this means in practice: Companies that do not know or reduce their digital CO2 footprint will face increasing regulatory and reputational pressure.
Lean Code: Less Is Faster
The most effective lever for sustainable web design is reducing the amount of data transferred. And the biggest culprit is often not what you expect.
Optimizing JavaScript Bundles
JavaScript is the largest contributor to performance issues and thus unnecessary energy consumption. A typical website loads 400-600 KB of JavaScript -- often more than actually needed.
Concrete measures:
- Tree shaking: Only load the code that is actually used. Modern bundlers like Webpack and Vite support this out of the box.
- Code splitting: Split JavaScript into chunks and only load them when needed. Next.js does this automatically per route.
- Audit external libraries: A single charting library can be 200 KB. Is there a lighter alternative? Or would a CSS-based solution suffice?
- Use bundle analyzers: Tools like
webpack-bundle-analyzershow which packages take up how much space.
Rule of thumb: Every reduced KB of JavaScript saves not only load time but also computing power on the end device -- and thus battery and energy.
Slimming Down CSS
- Remove unused CSS: Tools like PurgeCSS or Tailwind CSS with JIT compiler generate only the CSS actually used.
- Inline critical CSS: Embed the CSS for the visible area directly in the HTML head, load the rest asynchronously.
- Prefer system fonts: Every custom font file is an additional request. System fonts (San Francisco, Segoe UI, Roboto) load instantly and look modern.
Image Optimization: The Biggest Lever
Images typically make up 50-70% of the total size of a website. This is where the single biggest lever for sustainability and performance lies.
Use Modern Formats
- WebP: 25-35% smaller than JPEG at equivalent quality. Browser support stands at 97%.
- AVIF: Even more efficient than WebP -- 50% smaller than JPEG. Browser support is growing rapidly, currently above 92%.
- SVG: For icons, logos, and illustrations. Infinitely scalable, often only a few KB in size.
Implement Lazy Loading Consistently
Images that are not in the visible area should only load when the user scrolls to them. The native HTML attribute loading="lazy" suffices for most cases.
Additional optimizations:
- Responsive images: Different image sizes for different screens. Loading a 4K image on a smartphone wastes 90% of the data.
- Image compression: Quality level 80-85% is visually indistinguishable from 100% for most images but saves 40-60% in file size.
- Placeholders: Low-Quality Image Placeholders (LQIP) or BlurHash for an immediate layout before the actual image loads.
Efficient Hosting: The Underestimated Factor
Not all data centers are equal. The choice of hosting provider has a significant impact on CO2 footprint.
What to look for:
- Green electricity: Is the data center powered by 100% renewable energy? Providers like Hetzner (Germany), Infomaniak (Switzerland), and GreenGeeks use fully green power.
- Location: The closer the server is to users, the shorter the data transport path. For European audiences, the server belongs in Europe.
- CDN (Content Delivery Network): Distributes static content to servers worldwide so users always load from the nearest server. Reduces latency and network energy consumption.
- Serverless and edge computing: Instead of a permanently running server, code executes only on demand. No idle time, no unnecessary energy consumption.
The reality: Switching from a conventional to a green host can reduce a website's CO2 footprint by up to 90% -- often at no additional cost.
Performance as a Sustainability Metric
Sustainable websites are fast websites. The correlation is nearly perfect: every measure that makes a website more sustainable also makes it faster.
The win-win effect:
- 2-3x faster load times: Optimized images, lean code, and efficient hosting lead to dramatically better performance
- Better Core Web Vitals: And consequently better Google rankings
- Lower bounce rates: Faster pages keep visitors longer
- Higher conversions: Amazon has measured that every 100ms of faster load time brings 1% more revenue
- Lower hosting costs: Less data transfer means lower bandwidth costs
Tools for Measuring Digital Carbon Footprint
You cannot improve what you do not measure. These tools help you quantify your website's CO2 footprint:
- Website Carbon Calculator (websitecarbon.com): The most well-known test. Shows estimated CO2 emissions per page view and compares with the global average.
- Ecograder (ecograder.com): More comprehensive test that also evaluates performance, hosting, and best practices.
- Green Web Foundation (greenweb.org): Checks whether a host is powered by green electricity.
- Lighthouse (Chrome DevTools): Measures performance, which directly correlates with sustainability. A performance score above 90 typically also means a low CO2 footprint.
- DebugBear and SpeedCurve: For ongoing monitoring of page size and performance over time.
Recommendation: Measure your most important pages (homepage, product pages, landing pages) and set concrete targets: under 500 KB page size, under 0.5g CO2 per page view.
Practical Guide: 10 Steps to a Sustainable Website
- Measure: Determine the CO2 footprint of your current website
- Optimize images: WebP/AVIF, lazy loading, responsive sizes
- Clean up JavaScript: Remove unused libraries, implement code splitting
- Slim down CSS: Remove unused CSS, inline critical CSS
- Optimize fonts: Use system fonts or variable fonts with subsetting
- Implement caching: Set up browser caching and CDN
- Choose a green host: Switch to a provider with 100% renewable energy
- Offer dark mode: OLED screens consume significantly less power with dark colors
- Use animations deliberately: Every animation costs computing power. Only use when it serves a purpose
- Check regularly: Monthly monitoring of page size and CO2 values
Conclusion: Sustainability and Performance Are the Same Goal
Sustainable web design is not a constraint. It is a design philosophy that leads to better websites: faster, leaner, more user-friendly. Every measure that reduces the CO2 footprint simultaneously improves user experience and Google ranking.
EU regulation will increase pressure on companies to know and reduce their digital footprint. Those who act now have an advantage -- not just ecologically, but commercially.
The first step: Test your website at websitecarbon.com. The result will probably surprise you -- and motivate you.
