This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
The USBDevice interface of the WebUSB API provides access to metadata about a paired USB device and methods for controlling it.
USBDevice.configuration Read only Experimental
A USBConfiguration object for the currently selected interface for a paired USB device.
USBDevice.configurations Read only Experimental
An array of device-specific interfaces for controlling a paired USB device.
USBDevice.deviceClass Read only Experimental
One of three properties that identify USB devices for the purpose of loading a USB driver that will work with that device. The other two properties are USBDevice.deviceSubclass and USBDevice.deviceProtocol.
USBDevice.deviceProtocol Read only Experimental
One of three properties that identify USB devices for the purpose of loading a USB driver that will work with that device. The other two properties are USBDevice.deviceClass and USBDevice.deviceSubclass.
USBDevice.deviceSubclass Read only Experimental
One of three properties that identify USB devices for the purpose of loading a USB driver that will work with that device. The other two properties are USBDevice.deviceClass and USBDevice.deviceProtocol.
USBDevice.deviceVersionMajor Read only Experimental
The major version number of the device in a semantic versioning scheme.
USBDevice.deviceVersionMinor Read only Experimental
The minor version number of the device in a semantic versioning scheme.
USBDevice.deviceVersionSubminor Read only Experimental
The patch version number of the device in a semantic versioning scheme.
USBDevice.manufacturerName Read only Experimental
The name of the organization that manufactured the USB device.
USBDevice.opened Read only Experimental
Indicates whether a session has been started with a paired USB device.
USBDevice.productId Read only Experimental
The manufacturer-defined code that identifies a USB device.
USBDevice.productName Read only Experimental
The manufacturer-defined name that identifies a USB device.
USBDevice.serialNumber Read only Experimental
The manufacturer-defined serial number for the specific USB device.
USBDevice.usbVersionMajor Read only Experimental
One of three properties that declare the USB protocol version supported by the device. The other two properties are USBDevice.usbVersionMinor and USBDevice.usbVersionSubminor.
USBDevice.usbVersionMinor Read only Experimental
One of three properties that declare the USB protocol version supported by the device. The other two properties are USBDevice.usbVersionMajor and USBDevice.usbVersionSubminor.
USBDevice.usbVersionSubminor Read only Experimental
One of three properties that declare the USB protocol version supported by the device. The other two properties are USBDevice.usbVersionMajor and USBDevice.usbVersionMinor.
USBDevice.vendorId Read only Experimental
The official usb.org-assigned vendor ID.
USBDevice.claimInterface() Experimental
Returns a Promise that resolves when the requested interface is claimed for exclusive access.
USBDevice.clearHalt() Experimental
Returns a Promise that resolves when a halt condition is cleared.
USBDevice.controlTransferIn() Experimental
Returns a Promise that resolves with a USBInTransferResult when a command or status operation has been transmitted to the USB device.
USBDevice.controlTransferOut() Experimental
Returns a Promise that resolves with a USBOutTransferResult when a command or status operation has been transmitted from the USB device.
USBDevice.close() Experimental
Returns a Promise that resolves when all open interfaces are released and the device session has ended.
USBDevice.forget() Experimental
Returns a Promise that resolves after all open interfaces are released, the device session has ended, and the permission is reset.
USBDevice.isochronousTransferIn() Experimental
Returns a Promise that resolves with a USBIsochronousInTransferResult when time sensitive information has been transmitted to the USB device.
USBDevice.isochronousTransferOut() Experimental
Returns a Promise that resolves with a USBIsochronousOutTransferResult when time sensitive information has been transmitted from the USB device.
USBDevice.open() Experimental
Returns a Promise that resolves when a device session has started.
USBDevice.releaseInterface() Experimental
Returns a Promise that resolves when a claimed interface is released from exclusive access.
USBDevice.reset() Experimental
Returns a Promise that resolves when the device is reset and all app operations canceled and their promises rejected.
USBDevice.selectAlternateInterface() Experimental
Returns a Promise that resolves when the specified alternative endpoint is selected.
USBDevice.selectConfiguration() Experimental
Returns a Promise that resolves when the specified configuration is selected.
USBDevice.transferIn() Experimental
Returns a Promise that resolves with a USBInTransferResult when bulk or interrupt data is received from the USB device.
USBDevice.transferOut() Experimental
Returns a Promise that resolves with a USBOutTransferResult when bulk or interrupt data is sent to the USB device.
| Specification |
|---|
| WebUSB API> # device-usage> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
USBDevice |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | NoWebView exposes this interface, but does not support WebUSB. See bug 41441927. |
No |
claimInterface |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
clearHalt |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
close |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
configuration |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
configurations |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
controlTransferIn |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
controlTransferOut |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
deviceClass |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
deviceProtocol |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
deviceSubclass |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
deviceVersionMajor |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
deviceVersionMinor |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
deviceVersionSubminor |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
forget |
101 | 101 | No | 87 | No | 101 | No | 70 | No | 19.0 | No | No |
isochronousTransferIn |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
isochronousTransferOut |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
manufacturerName |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
open |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
opened |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
productId |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
productName |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
releaseInterface |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
reset |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
selectAlternateInterface |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
selectConfiguration |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
serialNumber |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
transferIn |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
transferOut |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
usbVersionMajor |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
usbVersionMinor |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
usbVersionSubminor |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
vendorId |
61 | 79 | No | 48 | No | 61 | No | 45 | No | 8.0 | No | No |
worker_support |
118Available in dedicated workers and WebExtension service workers, not available in shared workers and normal service workers.70–118Available in dedicated workers, not available in shared workers and service workers. |
118Available in dedicated workers and WebExtension service workers, not available in shared workers and normal service workers.79–118Available in dedicated workers, not available in shared workers and service workers. |
No |
104Available in dedicated workers and WebExtension service workers, not available in shared workers and normal service workers.57–104Available in dedicated workers, not available in shared workers and service workers. |
No |
118Available in dedicated workers and WebExtension service workers, not available in shared workers and normal service workers.70–118Available in dedicated workers, not available in shared workers and service workers. |
No |
79Available in dedicated workers and WebExtension service workers, not available in shared workers and normal service workers.49–79Available in dedicated workers, not available in shared workers and service workers. |
No |
25.0Available in dedicated workers and WebExtension service workers, not available in shared workers and normal service workers.10.0–25.0Available in dedicated workers, not available in shared workers and service workers. |
NoWebView exposes this interface, but does not support WebUSB. |
No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/USBDevice