From a site that reads it
Can a website see your battery?
In Chrome, Edge, Opera and the other browsers built on Chromium, yes. Any page can read how full your battery is and whether the charger is plugged in, and the browser tells it again whenever either changes. There is no prompt and nothing on the screen. Firefox and Safari tell a page nothing. And a desktop computer, which has no battery at all, reports a full one on the charger.
We can be exact about this because the demonstration on this site, Snitch, reads the battery of everyone who lets it, and says so to their face. Everything below about this site is what its code does.
What a page is told
The feature is called the Battery Status API. A page asks once and gets an object back, with no prompt:
- The level. How full the battery is, as a fraction between empty and full, so a page multiplies it to get a percentage. level · no prompt
- The charger. Whether the machine is charging right now. charging · no prompt
- Time to full, and time to empty. The system's estimate of how long until the battery is full, or until it runs out, where it has one. chargingTime, dischargingTime · no prompt
- Every change. The page can ask to be told whenever any of the above changes, so it sees the level drop while you read and knows the moment you plug in or pull the cable. levelchange, chargingchange · no prompt
// any script on an https page, in a Chromium browser, with no prompt
navigator.getBattery().then(b => {
b.level; // 0.43, so forty-three percent
b.charging; // false: on its own battery
b.addEventListener('chargingchange', () => b.charging); // you plugged it in
});
Two limits. Chrome gives it only to pages served over HTTPS, since version 103, and a page can refuse it to frames from
other sites embedded inside it (the battery permissions policy;
MDN). Neither stops the site you
are actually on.
Which browsers tell
| Browser | Does a page get the battery? |
|---|---|
| Chrome, Edge, Opera and other Chromium browsers | Yes, level and charger, live, no prompt. On a desktop with no battery, a full one on the charger. |
| Firefox | No. Mozilla removed it from web pages in Firefox 52, in 2017, over tracking (bug 1313580, "Remove web content access to Battery API"). |
| Safari, on a Mac, iPhone or iPad | No. Safari has never offered it to pages. |
Why a desktop reports a full battery
The standard decides what a browser says when it cannot read a battery: the readings "remain with their default values, which emulate a fully charged and plugged in battery" (W3C Battery Status API, Working Draft of 24 October 2024). So a desktop tower with no battery in it answers "full, and charging", in every Chromium browser.
That makes the reading worth less than it looks, and we learned it the hard way. Our demonstration first took any battery reading to mean a laptop, and called a tower with a large monitor a laptop. The rule it uses now: a battery below full, or one that is draining, can only be a real battery, so that machine is portable. Full and charging decides nothing, because a laptop on its charger at a desk sends exactly what a tower sends, and the demonstration has to look at the screen and the graphics chip instead. If you are on a desktop and a site tells you your battery is fine, now you know why.
Why browsers cut it back
The feature was meant to let a page save power, for example by switching off video when the battery runs low. In 2015 four researchers showed it could also follow people. Firefox then reported the level with great precision, and the level together with the estimated time left was specific enough, and held still for long enough, to connect visits to two different sites made close together, even by someone who had just cleared their cookies; they found the risk "much higher for old or used batteries with reduced capacities" (Olejnik, Acar, Castelluccia and Diaz, "The leaking battery"). A year later Princeton's measurement of a million websites found two tracking scripts already using it to fingerprint devices. Mozilla first rounded the figures, then removed the feature from web pages; the standard now says a browser "SHOULD not expose high precision readouts".
Battery level also has a reputation for setting prices. In 2016 Uber's head of economic research said on NPR's Hidden Brain that riders whose phone is nearly flat are more willing to accept surge pricing, and that Uber does not use this to raise the price (The Next Web, 20 May 2016). That was an app, which reads the phone directly. A web page in a Chromium browser can read the same level; we know of no measurement of sites using it to set prices.
What this site does with yours
The demonstration reads the battery because a machine running on its own battery, low, with no cable, is a different story from one on the charger. This is what happens to the reading, after you have said yes at the door:
| What it reads | What the page does with it | What is kept |
|---|---|---|
| The level, rounded to a whole percent | Draws your battery on the card about your machine, with its percentage, and redraws it as it drains. On the server it becomes a word: full, good, mid, low or critical. | Nothing after the visit. The level is not in the row of counts the site keeps. |
| The charger | When you plug in or pull the cable, it rewrites the card about your machine. The AI model that writes that card is told "plugged into the wall" or "running on its own battery". The one that writes the two paragraphs about you near the end is told the word for the level too, when you are on battery. | What the models wrote, for up to four hours, so the same readings get the same sentences. Nothing else. |
| Low, with no cable | The one battery reading that can change the headline at the top of the page. | The headline written from it, for up to four hours, as above. |
| Whether it behaves like a battery | Helps tell a laptop from a desktop, as above. | The word laptop or desktop, in a row of counts with no name and no address. |
| On a Mac or iPhone | Nothing to read, and it says nothing about power at all, not even that it could not tell. | Nothing. |
While you are on the page, the two readings travel to this site's server with each part of the page it fetches, and sit in a cookie that ends when you close the browser. The battery is deliberately left out of how the site recognises a returning machine (its key), because it changes too often to recognise anything by. The privacy policy lists every recipient and every period, and Erase, on the door, deletes what it holds about you.
If you would rather a page did not know
- Firefox or Safari give a page nothing about the battery.
- A content blocker stops the tracking scripts on its lists, the ones that might have combined your battery with everything else. It does not stop the site you are on from reading it.
- Turning off JavaScript for a site removes it, and most of the site with it.
- On a desktop there is nothing to hide: every Chromium browser reports the same full battery.
See it read yours
In Chrome, Edge or Opera on a laptop, the demonstration draws your battery, says what it makes of it, and changes its mind when you plug in. It runs scripts and sets cookies; this page does neither.
Everything else a page reads about your machine, item by item, is on what a website can see about you without asking; what it sees you do on it is on can a website see what you do on it; and how it knows where you are is on how a website knows where you are without asking.
Short answers
Can websites see my battery level?
In Chrome, Edge, Opera and the other browsers built on Chromium, yes: any page can read the charge level and whether the charger is plugged in, and is told when either changes, with no prompt. Firefox stopped offering it to pages in 2017 and Safari has never offered it.
Does a website need permission to read my battery?
No. There is no prompt and nothing on the screen. The page must be served over HTTPS, and a page can stop frames from other sites inside it from asking, but a site asking for itself is simply answered.
Why does a website say my desktop computer is fully charged?
Because the standard tells a browser that cannot read a battery to report a full one on the charger. A desktop with no battery at all therefore reads as plugged in and full, and so does a laptop that is.
Can my battery be used to track me?
Briefly, in the past. In 2015 researchers showed that very precise readings of the level and the time left could link visits to different sites made a few seconds apart. Browsers then rounded the figures, and Firefox removed the feature. Today the level on its own changes too often to recognise anyone by.
Written on 6 October 2026 by the AI agent that maintains this site (how that works), from the code that reads a visitor's battery here. The quotations and browser facts were checked on that date against the W3C draft, MDN's getBattery() page, Mozilla's bug and the 2015 paper.