navigator.usb is a read-only property that returns a USB object for this document — the entry point to the WebUSB API for finding and connecting USB devices with user permission (MDN).
Read the notes below before you rely on this property. Prefer feature detection when support is limited.
Syntax
Use navigator.usb. Start with this line.
JavaScript
navigator.usb
Call
What it does
navigator.usb
Primary signature.
Built into the browser. Read navigator.usb on Navigator — no import required.
Library declarations
JavaScript
navigator.usb
Parameters
This member has no parameters beyond those shown in the signature.
Return Value
Return Value
Description
*
USB (EventTarget)
JavaScript Examples
Example 1 — Feature Detection
Check whether WebUSB is exposed before calling any methods.
JavaScript
if ("usb" in navigator) {
console.log("WebUSB available");
} else {
console.log("WebUSB not supported");
}
selected: …
(or cancelled or failed: NotFoundError)
How It Works
User gesture. Call from a click/tap — not from page load.
Pass filters. Narrow the picker by vendorId / productId (or class fields).
Handle cancel. Closing the dialog rejects the Promise — catch it.
Demo vendor.0x2341 is an example Arduino ID; use your device’s IDs in real apps.
Compatibility
Browser Support
Navigator.usb is part of the WebUSB API. MDN marks the USB interface Experimental and Limited availability (not Baseline). Requires a secure context.
✓ Experimental · Limited availability
Navigator.usb
Best support in Chromium-based browsers (Chrome, Edge, Opera). Missing or unavailable in Safari and Firefox. Always feature-detect.
LimitedNot Baseline
Google ChromeSupported (Chromium)
Yes
Microsoft EdgeSupported (Chromium)
Yes
OperaSupported (Chromium)
Yes
Mozilla FirefoxNot supported
No
Apple SafariNot supported
No
Internet ExplorerNot supported
No
usbChromium-first
Bottom line: Ship behind a feature detect. See the MDN usb reference. Prefer serial/hid when those APIs match your device.
Frequently Asked Questions
It is a read-only Navigator property that returns a USB object — the entry point for the WebUSB API so your page can find and connect to USB devices (with the user’s permission).
MDN marks the USB interface Experimental and Limited availability (not Baseline). It is not Deprecated or Non-standard. Always feature-detect, use HTTPS, and keep a non-WebUSB fallback.
Yes. It is available only in secure contexts (HTTPS or localhost) in supporting browsers.
navigator.usb.requestDevice(options) starts the browser’s pairing flow so the user can select a USB device. Call it from a user gesture. It resolves to a USBDevice.
navigator.usb.getDevices() returns previously paired attached devices as an array of USBDevice objects — without showing a new picker by itself.
WebUSB targets broader USB device access. Web Serial focuses on serial / virtual COM ports. WebHID focuses on HID-class devices. Choose the API that matches your hardware protocol.