The Battery Status API works in Chrome 38+, Edge 79+, Opera 25+, and Samsung Internet, while Firefox removed it and Safari does not support it.

Prince Dewani
May 4, 2026
The Battery Status API is a W3C JavaScript API that exposes a device's charge level and charging state through navigator.getBattery() and a BatteryManager object. It works in Chrome 38+, Edge 79+, Opera 25+, Samsung Internet, and Chrome for Android, while Firefox removed it and Safari does not support it.
This guide covers what the Battery Status API is, the browsers that support it, the key features, the privacy concerns, the use cases, and the known issues.
The Battery Status API is a W3C JavaScript API that lets a web page read a device's charge level, charging state, and time-to-full or time-to-empty estimates. The API entry point is navigator.getBattery(), which returns a Promise that resolves with a BatteryManager object exposing four properties and four change events.
Every Chromium-based browser supports the Battery Status API on desktop and Android, while Firefox removed it and Safari has never shipped it on macOS or iOS, leaving global support around 76%.
Chrome supports the Battery Status API from Chrome 38 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 37 had it disabled by default behind the chrome://flags experimental-web-platform-features flag, and Chrome 4 to 36 did not support it. From Chrome 103 on, navigator.getBattery() is exposed only to secure HTTPS contexts.
Microsoft Edge supports the Battery Status API from Chromium-based Edge 79 on Windows, macOS, Linux, and Android. Pre-Chromium EdgeHTML 12 to 18 never added the API, so any legacy Edge user gets an undefined navigator.getBattery and must fall back to a default code path.
Firefox does not support the Battery Status API in current versions. Firefox 43 to 51 shipped it on desktop, but Firefox 52 removed access on every platform after the API was shown to be a strong fingerprinting vector. Firefox for Android also dropped it in the same cycle, so navigator.getBattery is undefined on every modern Firefox build.
Safari does not support the Battery Status API on macOS or iOS. WebKit considered the API early but never shipped it past an experimental build and has consistently flagged it as a fingerprinting risk. Apple forces every iOS browser to use WebKit, so Chrome, Edge, Firefox, and Opera on iPhone and iPad inherit the same gap.
Opera supports the Battery Status API from Opera 25 on Windows, macOS, and Linux, tracking the Chromium 38 baseline. Opera Mobile 80+ supports it on Android. Opera 9 to 24 and Opera Mobile 10 to 12.1 did not support it. Opera Mini does not support it because its server-rendered pipeline strips JavaScript APIs.
Samsung Internet supports the Battery Status API on every shipping version on Galaxy phones, because the browser tracks the Chromium pipeline that Chrome for Android uses. Samsung Internet exposes the same charging, level, chargingTime, and dischargingTime values, with the same secure-context gate from its Chromium 103-based releases on.
Chrome for Android, modern Android WebView, Samsung Internet, and UC Browser for Android 15.5+ provide the Battery Status API on Android. The legacy stock Android Browser shipped with Android 4.4 KitKat and earlier never added it, so any device still on that browser falls into the unsupported path.
Internet Explorer does not support the Battery Status API in any version from IE 5.5 through IE 11. Microsoft has retired Internet Explorer 11, so any battery-aware web app needs Chromium-based Edge or Chrome on Windows.
Note: Battery Status API support splits sharply across Chrome, Firefox, and Safari. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
The Battery Status API is built around one Promise-returning entry point, a BatteryManager object with four read-only properties, and four change events. Every value is reactive, so a single getBattery() call gives a page everything it needs.
Paste this snippet into the DevTools console of Chrome, Edge, Opera, or Samsung Internet over HTTPS. The console logs the current battery state and re-logs whenever any of the four values change.
// Paste this into the DevTools console of Chrome, Edge, Opera, or Samsung Internet over HTTPS.
// Safari and Firefox do not expose navigator.getBattery, so the script logs a fallback message there.
if ("getBattery" in navigator) {
navigator.getBattery().then((battery) => {
const log = () => {
console.log("Charging:", battery.charging ? "yes" : "no");
console.log("Level:", Math.round(battery.level * 100) + "%");
console.log("Charging time:", battery.chargingTime, "seconds");
console.log("Discharging time:", battery.dischargingTime, "seconds");
};
log();
battery.addEventListener("chargingchange", log);
battery.addEventListener("levelchange", log);
battery.addEventListener("chargingtimechange", log);
battery.addEventListener("dischargingtimechange", log);
});
} else {
console.log("Battery Status API is not supported in this browser.");
}The Battery Status API is the textbook fingerprinting case in modern web standards work. The combination of level, chargingTime, and dischargingTime is precise enough to re-identify a single device across origins and across private-browsing sessions, which is why Firefox dropped it and Safari never shipped it.
The Battery Status API is the right tool when a web app needs to throttle expensive work on a low battery or warn the user before unsaved changes vanish. Production sites use it as a progressive enhancement, not a hard dependency.
The Battery Status API is well-supported on Chromium, but the rough edges show up around the Safari and Firefox gap, the rounded values, and the cases where the OS hands the browser stale or sentinel data.
In my experience, the trap that bites every Battery Status integration once is the dischargingTime: Infinity case on a charging laptop. A naive "warn the user when less than 600 seconds remain" check fires on a desktop with no battery if you forget to filter Infinity out first. Branch on charging before you read dischargingTime and the surprise goes away.
All Battery Status API version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance