Smart Deals - promotions, discount codes and sales

Browser Battery Status Api Tester

Fast, accurate and free online browser battery status api tester tool running directly in your browser.

Secure (SSL)
Client-Side Processing
100% Free
Instructions
  • 1
    Enter data
    Enter content, paste text or load a file from disk.
  • 2
    Click the button
    The tool will immediately process your data in the browser.
  • 3
    Get the result
    Copy the finished text or save the file to your device.
function runTool() {
  return "Result ready in 0.1s";
}
25 characters

label: Office laptop (QA device) mode: once auto refresh: 1 requested at: 2026-08-30 22:54:34

Rate this tool:

Related tools

Other tools you may find useful

Battery Status API - testing browser battery support

Battery Status API (W3C) allows web applications to read a device's battery level via JavaScript. The tool tests whether your browser provides this data and displays current information: charge level, charging status, time until fully charged or discharged.

Battery Status API battery level JavaScript navigator.getBattery() check battery browser

What is Battery Status API

Battery Status API (W3C specification) provides a JavaScript API: navigator.getBattery() returns Promise with an object BatteryManager. Properties: battery.level (0.0–1.0, charge level), battery.charging (boolean, whether it is charging), battery.chargingTime (seconds to full), battery.dischargingTime (seconds to discharge). Events: chargingchange, chargingtimechange, dischargingtimechange, levelchange.

Browser support

Chrome: Supported (Desktop and Android). Firefox: removed in v52+ (privacy – fingerprinting). Safari: not supported. Edge: Supported (Chromium-based). Opera: supported. Note: Many browsers intentionally limit or remove the API for privacy reasons (the battery may have been used for user fingerprinting).

JavaScript code example

navigator.getBattery().then(battery => { console.log(battery.level*100 + "%"); console.log(battery.charging ? "Charging" : "Battery"); console.log(battery.chargingTime + " s to full"); battery.addEventListener("levelchange", () => { console.log("Change:", battery.level });

Uses of Battery API

PWA (Progressive Web App): adjust low battery behavior (reduce polling, disconnect WebSocket). Web games: power saving mode. Analytics: check if users with low battery have a higher bounce rate. Notifications: "Battery low - save your work." Monitoring: alert user at < 20%.

FAQ

Why did Firefox remove the Battery Status API?

In 2015, researchers (Olejnik et al.) showed that battery.level + battery.chargingTime + battery.dischargingTime = unique fingerprint of the device with an efficiency of ~67%. This allowed trackers to track users even after clearing cookies. Firefox removed the API in v52 (2017). Safari never implemented it. This is one of the few cases where an accepted standard has been removed for privacy reasons.

How to check battery level in Node.js?

Battery Status API only works in the browser. In Node.js: systeminformation (npm) – si.battery() returns hasBattery, percent, isCharging, timeRemaining. PowerShell (Windows): Get-WmiObject Win32_Battery. Linux: cat /sys/class/power_supply/BAT0/capacity. macOS: pmset -g batt.

Does Battery API work on the phone?

Android Chrome: Supported (physical battery). Android Firefox: removed. iOS Safari: not supported. PWA for Android with Chrome: battery access possible. Ionic/Cordova: cordova-plugin-battery-status plugin (works on iOS and Android).

How to simulate low battery in DevTools?

Chrome DevTools: Sensors tab (Cmd+Shift+P → "Sensors"). In the Battery section: mock battery level, charging state, charging/discharging time. Useful for testing PWAs with battery-aware logic. Firefox: no battery simulator (API removed).

What other APIs may violate privacy?

Fingerprinting APIs: Canvas (unique GPU rendering), WebGL (renderer, vendor), AudioContext (AudioWorklet timing), Screen Resolution, Timezone, Language, Plugin list. Battery API was in this group. Privacy Sandbox (Google): an attempt to limit fingerprinting while maintaining advertising function

Install Webp.pl Have the tools in your own pocket!