🌱 Sustainable Web Analyzer

How sustainable is your website?

Every visit to your website travels through servers, cables and power grids. The Sustainable Web Analyzer makes that chain visible, so you can make your website lighter, greener and closer to home.

Try it at kreativ-anders.de API openapi.json

The hidden chain

  1. Weight

    Every byte of HTML, scripts, styles and images takes energy to send.

  2. File types

    Modern formats like WebP compress images far better than JPG or PNG.

  3. HTML

    Semantic elements instead of nested divs make code lean, accessible and easy to read.

  4. Hosting

    Green hosting runs the servers on renewable energy.

  5. Location

    The server's country decides the power mix and which laws apply to your visitors' data.

  6. Distance

    Nearby hosts keep traffic short. Hosts abroad send it across oceans and borders.

  7. Cookies

    No cookies means no consent banner and more privacy for your visitors.

  8. CO2

    All of it adds up to grams of CO2 per visit, graded from A+ to F.

Small choices add up: fewer bytes, lean code, green hosting nearby and no tracking make a website faster, cleaner and more independent. A sustainable website is also a better one for visitors: it loads quickly on slow connections, works on older devices and respects their privacy.

How it works

The tool adds up everything a first visit downloads: the HTML plus its scripts, stylesheets and images. It checks where those files are hosted and whether the hosting runs on green energy.

Bytes become energy, energy becomes CO2 using the power mix of the server's country. The result is grams of CO2 per visit and a grade from A+ to F, following the Sustainable Web Design Model v4.

Each result is cached for a week, so repeated checks of the same website cost no extra energy. Every step of the analysis is documented in the API reference, and the full response schema is in openapi.json.

Example

Analyze any website with a single request. The JSON response lists the bytes a first visit downloads, the country of every host, whether the hosting is green and how much CO2 one visit causes:

GET /api/?url=kreativ-anders.de

{
  "bytes": 217543,
  "hosts": { "kreativ-anders.de": "DE" },
  "green": true,
  "co2": { "per_visit": 0.0263, "rating": "A+", "unit": "g", … },
  …
}

The endpoint is open and needs no key. It is protected by rate limits instead: ten uncached analyses per visitor per day, with cached results served for free. The exact limits and the responses when one is reached are in the API reference.

Run

echo "<?php return ['debug' => true];" > config.php   # optional, overrides config.default.php
php -S 127.0.0.1:8080 -t docs index.php   # docs at /, API at /api/
bin/analyze https://kreativ-anders.de
php tests/run.php

Production: nginx + PHP-FPM with nginx.conf.example.