WebUSBLimited availability
The WebUSB API exposes USB compatible devices to web pages.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–60Not supported
61+Supportedsince Sep 5, 2017
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
✕Not supportedup to 27
Current: 27MobileChrome Android
18–60Not supported
61+Supportedsince Sep 5, 2017
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Firefox, Safari, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: usb.
Feature detection
JS · check before using
if ("USB" in globalThis) {
// USB is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (106). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Navigator.usb | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USB | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USB.connect_event | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USB.disconnect_event | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USB.getDevices | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USB.requestDevice | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USB.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBAlternateInterface | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBAlternateInterface.USBAlternateInterface | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBAlternateInterface.alternateSetting | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBAlternateInterface.endpoints | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBAlternateInterface.interfaceClass | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBAlternateInterface.interfaceName | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBAlternateInterface.interfaceProtocol | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBAlternateInterface.interfaceSubclass | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBAlternateInterface.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBConfiguration | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBConfiguration.USBConfiguration | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBConfiguration.configurationName | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBConfiguration.configurationValue | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
Show 86 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| USBConfiguration.interfaces | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBConfiguration.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBConnectionEvent | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBConnectionEvent.USBConnectionEvent | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBConnectionEvent.device | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBConnectionEvent.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBDevice | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.claimInterface | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.clearHalt | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.close | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.configuration | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.configurations | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.controlTransferIn | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.controlTransferOut | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.deviceClass | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.deviceProtocol | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.deviceSubclass | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.deviceVersionMajor | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.deviceVersionMinor | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.deviceVersionSubminor | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.forget | 101 | 101 | ✕ | ✕ | 101 | ✕ | ✕ |
| USBDevice.isochronousTransferIn | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.isochronousTransferOut | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.manufacturerName | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.open | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.opened | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.productId | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.productName | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.releaseInterface | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.reset | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.selectAlternateInterface | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.selectConfiguration | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.serialNumber | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.transferIn | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.transferOut | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.usbVersionMajor | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.usbVersionMinor | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.usbVersionSubminor | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.vendorId | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBDevice.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBEndpoint | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBEndpoint.USBEndpoint | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBEndpoint.direction | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBEndpoint.endpointNumber | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBEndpoint.packetSize | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBEndpoint.type | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBEndpoint.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBInTransferResult | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInTransferResult.USBInTransferResult | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInTransferResult.data | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInTransferResult.status | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInTransferResult.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBInterface | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInterface.USBInterface | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInterface.alternate | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInterface.alternates | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInterface.claimed | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInterface.interfaceNumber | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBInterface.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBIsochronousInTransferPacket | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousInTransferPacket.USBIsochronousInTransferPacket | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousInTransferPacket.data | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousInTransferPacket.status | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousInTransferPacket.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBIsochronousInTransferResult | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousInTransferResult.USBIsochronousInTransferResult | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousInTransferResult.data | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousInTransferResult.packets | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousInTransferResult.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBIsochronousOutTransferPacket | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousOutTransferPacket.USBIsochronousOutTransferPacket | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousOutTransferPacket.bytesWritten | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousOutTransferPacket.status | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousOutTransferPacket.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBIsochronousOutTransferResult | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousOutTransferResult.USBIsochronousOutTransferResult | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousOutTransferResult.packets | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBIsochronousOutTransferResult.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| USBOutTransferResult | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBOutTransferResult.USBOutTransferResult | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBOutTransferResult.bytesWritten | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBOutTransferResult.status | 61 | 79 | ✕ | ✕ | 61 | ✕ | ✕ |
| USBOutTransferResult.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| WorkerNavigator.usb | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| iframe.allow.usb | 60 | 79 | ✕ | ✕ | 60 | ✕ | ✕ |
| http.headers.Permissions-Policy.usb | 88 | 88 | ✕ | ✕ | 88 | ✕ | ✕ |