CO2.js is an open-source JavaScript library that enables developers to estimate the carbon emissions produced by transferring bytes of data on the internet
https://www.thegreenwebfoundation.org/news/curious-about-driving-the-transition-to-a-fossil-free-internet-heres-how-co2-js-can-help/
Curious about driving the transition to a fossil-free internet? Here’s how CO2.js can help.

This article will explain the concepts behind CO2.js, it’s uses, and when other tools might be better options to consider.

The Green Web Foundation