Web Bluetooth API browser support
Published Updated
The navigator.bluetooth.requestDevice() method returns a promise for a Bluetooth device that matches the supplied criteria. When the browser has no chooser UI, it returns the first matching device. Its browser support is recorded under BCD key api.Bluetooth.requestDevice.
Chrome supports requestDevice() on desktop and Android from version 56. Edge supports it from version 79, Samsung Internet from 6.0, and Opera from 43. The BCD record lists no support in Firefox on desktop or Android, Safari on macOS or iOS, or Android WebView. Firefox and WebKit implementation trackers are attached to the corresponding rows.
- Legend
- Yes
- Partial
- Flag
- No
- Unknown
| Browser / Platform | Support | Versions | Confidence | Source | Notes |
|---|---|---|---|---|---|
| Chrome (Desktop)# | Yes | 56 | high | source | — |
| Chrome (Android)# | Yes | 56 | high | source | 1 |
| Edge (Desktop)# | Yes | 79 | high | source | 2 |
| Firefox (Desktop)# | No | — | high | source | 3 |
| Firefox (Android)# | No | — | high | source | 45 |
| Safari (macOS)# | No | — | high | source | 6 |
| Safari (iOS)# | No | — | high | source | 78 |
| Samsung Internet# | Yes | 6.0 | high | source | 9 |
| WebView (Android)# | No | — | high | source | 10 |
| Opera# | Yes | 43 | high | source | 11 |
- Derived by browser-compat-data mirroring from Chrome.
- Derived by browser-compat-data mirroring from Chrome.
- Implementation tracking: https://bugzil.la/674737.
- Implementation tracking: https://bugzil.la/674737.
- Derived by browser-compat-data mirroring from Firefox.
- Implementation tracking: https://webkit.org/b/101034.
- Implementation tracking: https://webkit.org/b/101034.
- Derived by browser-compat-data mirroring from Safari.
- Derived by browser-compat-data mirroring from Chrome Android.
- No WebView Android support is recorded in browser-compat-data.
- Mirrors Chrome's implementation (BCD `opera: mirror`): Linux support exists but is not enabled by default.
Requesting a device
Section titled “Requesting a device”navigator.bluetooth returns the document’s Bluetooth object. requestDevice() returns a promise for a BluetoothDevice that matches the supplied options. The API is limited to secure contexts and is not exposed through WorkerNavigator, so device selection starts in a document.
The options must provide filters or set acceptAllDevices to true. A filter can match advertised GATT services, a device name, or a name prefix. After selection, the origin can access services named by filters.services and optionalServices; a name-only filter therefore needs optionalServices for services the app intends to use.
The permission prompt for a new device appears when requestDevice() runs, and the owning global object needs transient activation. Put the call directly in a click or tap handler. This example detects the API before requesting a device and leaves the button disabled when the interface is absent.
const button = document.createElement('button');button.textContent = 'Connect a Bluetooth device';const status = document.createElement('p');document.body.append(button, status);
if (!('bluetooth' in navigator)) { button.disabled = true; status.textContent = 'Bluetooth connection is unavailable in this browser.';} else { button.addEventListener('click', async () => { try { const device = await navigator.bluetooth.requestDevice({ filters: [{ services: ['battery_service'] }], }); status.textContent = device.name ?? 'Bluetooth device selected'; } catch (error) { status.textContent = `${error.name}: ${error.message}`; } });}The feature test selects a visible fallback before any permission request. In a supporting browser, the click handler requests a device advertising the Battery Service. The returned object identifies the selected device; opening a GATT connection and reading characteristics are covered by the Web Bluetooth reference entry.
Permissions and embedding
Section titled “Permissions and embedding”The bluetooth Permissions Policy controls access. Its default allowlist is self, which permits same-origin nested frames and blocks third-party content by default. Cross-origin frames need the origin in both the Permissions-Policy response header and the iframe’s allow attribute. A policy block prevents the permission prompt from appearing.
Previously granted devices can be returned by Bluetooth.getDevices(). The Permissions API can query the bluetooth permission state as granted, denied, or prompt; each related method has its own BCD support data.
See also
Section titled “See also”- Web Bluetooth API: connecting to Bluetooth Low Energy devices
- WebUSB API browser support
- Web Bluetooth specification (Web Bluetooth Community Group)
- Web Bluetooth API (developer.mozilla.org)