Badging API - Interactive Lab | IconVault

Try navigator.setAppBadge live with a real favicon fallback that draws the badge on the tab icon. Free, runs in your browser.

All tools

Badging API

App badge counter with live favicon fallback

5 of 5 free uses left

navigator.setAppBadge is not available in this browser (it needs Chrome/Edge 81+ or Safari 16.4+). This tool automatically uses a real fallback instead: it draws the badge onto this tab's favicon so you can see the effect live.

Badge controls

Favicon fallback

5 of 5 free badge sets left. Everything runs in your browser.

Worth knowing

  • The native badge appears on the installed PWA / app icon, not on the tab.
  • setAppBadge(0) and clearAppBadge() both clear it.
  • Most platforms render counts above 99 as "99+".
  • The favicon fallback changes this tab's icon in real time.

Live preview

Current badge

cleared

No badge set yet.

The real code

// Set (resolves even where the OS shows nothing: feature-detect anyway)
if ("setAppBadge" in navigator) {
  await navigator.setAppBadge(3);   // number shown on the app icon
  await navigator.clearAppBadge();  // or setAppBadge(0)
}

// Favicon fallback (works everywhere): draw the count onto the tab icon
const canvas = document.createElement("canvas"); // 64x64
// ... drawImage(favicon) + red dot + count, then:
document.querySelector('link[rel="icon"]').href = canvas.toDataURL();

About this tool

IconVault's Badging API playground calls the real `navigator.setAppBadge()` and `clearAppBadge()` so you can experiment with unread counts, plus and minus stepping, and clearing. Where the API is missing, the tool does not fake it: it draws the badge live onto this tab's favicon, giving you a real visual result in any browser. It is free and runs fully in your browser.

Badges are the quiet workhorse of installed web apps: chat apps show unread messages, mail clients show inbox counts, task apps show due items. The lab explains where the native badge actually appears (the installed PWA or app icon, never the tab), the 99+ display convention, and the exact three-line favicon fallback you can ship today for browsers without support.

Frequently asked questions

Popular searches

badging apinavigator.setappbadgesetappbadgeclearappbadgeapp badge apibadge api javascriptpwa badgepwa app badgeunread badge web appnotification badge pwabadging api demobadging api examplesetappbadge exampleapp icon badge webfavicon badgedynamic favicon badgefavicon notification countdraw badge on favicontab icon badgebrowser tab notification badgebadging api browser supportbadging api safaribadging api chromebadging api firefoxmdn badging apihow to show badge on pwa iconpwa unread countweb app badge numbersetappbadge typescriptbadging api tutorialbadge counter javascriptnotification dot faviconlive favicon updatecanvas faviconchange favicon dynamicallyinstalled pwa badgeweb app icon badgebadging api polyfillfavicon fallback badgeshow count on app iconpwa push badgedoes setappbadge work without installbadging api httpsapp badgingw3c badging apiexperimental badgingtest badging api onlinebadging playgroundsetappbadge not workingpwa icon badge numberweb badging demo

More tools

Coming soon

CLI

Coming soon

Figma plugin

Coming soon

VS Code extension

Coming soon

Chrome extension

Coming soon

AI icon generator

Coming soon

Team workspaces

Coming soon

View all 10+ tools →