Open-source project
whatwg/usb avatar
whatwg/usb

whatwg/usb: WebUSB browser support and adoption limits

Connecting hardware to the web.

1,410 stars140 forksBikeshedNOASSERTION

At a glance

What is it?
whatwg/usb is the specification repository for WebUSB, a browser platform for connecting compatible USB hardware to web applications. It is most relevant to Chromium-based browser projects and Node.js developers using the separate `usb` package, not to teams seeking a general-purpose cross-browser USB driver.
Who is it for?
Adopt whatwg/usb when the target browser is Chromium-based and the product needs page-level access to compatible USB hardware. Do not treat this repository as a runtime library or assume Safari and Firefox support from the README.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 139 days ago.
What is it written in?
Mainly Bikeshed, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

whatwg/usb and the browser-to-device connection it specifies

whatwg/usb addresses a specific boundary in application development: connecting compatible USB hardware to an application running on the web. The repository describes WebUSB with the concise phrase "Connecting hardware to the web," but its role is primarily specification work rather than shipping an installable USB driver. The main deliverable identified by the README is an Editor's Draft specification, accompanied by a separate Test API specification.

The intended users are developers who want a web application to communicate with USB hardware without presenting the repository as a native device driver. The listed demos give concrete categories of use: Arduino integration, lighting control, device firmware upgrade, Android debugging through WebADB, a Zephyr JavaScript IDE, and DSLR camera control. These examples indicate that the proposed surface is intended for device communication, firmware workflows, robotics, and related tooling. The README does not claim that every USB device, class, interface, or operating-system combination is supported.

Browser compatibility is the first adoption constraint documented by the project. The README states that WebUSB is available in Chromium-based browsers for Android, ChromeOS, Linux, macOS, and Windows, with availability beginning in Chrome 61. It does not document equivalent support for other browser engines. That makes platform support a product requirement rather than an implementation detail for teams serving mixed browser populations.

The repository structure behind the WebUSB drafts

Based on the repository layout, whatwg/usb contains specification sources, tests, governance files, and supporting explainers. `index.bs` is the visible Bikeshed source for the main document, while `test/` contains the test-oriented material. The README links the rendered specification and the Test API specification as Editor's Drafts. It directs specification discussion to the GitHub issue tracker, while Chrome implementation problems belong in the Chromium issue tracker under the Blink USB component.

This separation matters for readers deciding what the repository means by an API. A rendered draft describes intended web platform behaviour. The `test/` directory relates to specification tests. Neither makes the repository a JavaScript package that an application can install directly. The absence of a documented `package.json`, published package release, or command in the README reinforces that distinction.

Several files also indicate that security and permission boundaries are treated as specification subjects. The repository includes `security-and-privacy-questionnaire.md`, `extension-service-worker-explainer.md`, `unrestricted-usb-explainer.md`, and `blocklist.txt`. Based on those names, the repository addresses security and privacy, service workers, an unrestricted USB proposal, and device blocklisting. The README does not summarize the operative rules in those files, so this article does not invent permission prompts, origin restrictions, blocked device classes, or transfer guarantees.

The repository has no GitHub releases. Developers should therefore treat the linked specifications as living drafts rather than versioned GitHub release artifacts unless they independently identify a stable specification version.

First WebUSB use through a Chromium browser

The README does not provide installation commands for WebUSB. It says the capability is available in Chromium-based browsers for Android, ChromeOS, Linux, macOS, and Windows, beginning with Chrome 61. Therefore, the first deployment step is to use a supported Chromium browser and consult the Editor's Draft for the exact API calls required by the hardware workflow. The repository does not include an application example, so no invented `navigator.usb` snippet or permission flag appears here.

A concrete first use starts with selecting one of the documented implementation patterns. For an Arduino project, the README links the Arduino integration project. For firmware work, it points to USB Device Firmware Upgrade. For Android debugging, it lists WebADB. Each linked project represents a separate codebase with its own setup instructions, and whatwg/usb does not reproduce those instructions.

The reader should expect the browser to be only one part of the path. The application needs compatible hardware, a supported operating system, and a device workflow compatible with the WebUSB specification. Because the README does not state which USB classes are mandatory, which devices can be excluded through `blocklist.txt`, or how permissions are presented, these details must be checked in the specification and browser documentation before an application is designed.

This is also not a general iOS or non-Chromium browser tutorial. Android appears in the supported platform list because the README says the functionality is available in Chromium-based browsers there. It does not follow that every Android browser exposes WebUSB.

Node.js WebUSB through the separate `usb` package

For server-side or Node.js tooling, the README points to the separate `node-usb/node-usb` repository and states that its `usb` package exports a `WebUSB` object. That is the only Node.js integration detail documented here. It does not follow that the Node.js package is published, maintained, or released under the same terms as whatwg/usb, because its repository and package metadata are not covered by the whatwg/usb README.

The README gives no package-manager installation command, version, import statement, initialization sequence, or device-opening example. An article that supplied those details would be guessing. Developers evaluating server-side hardware access must open the linked `usb` package documentation and confirm the installed package name, release compatibility, transfer API, and platform requirements there.

The architectural distinction is straightforward but important. WebUSB is the browser platform specification maintained in whatwg/usb. The `usb` package is a Node.js package that exports an object carrying the `WebUSB` name. Similar naming does not establish that the Node.js object implements every browser permission, origin, or user-gesture rule. The README does not claim that equivalence.

For a Node.js application, the first verification should therefore be concrete: inspect the linked package documentation, install using the command documented by that project, and confirm whether its `WebUSB` object covers the specific device operations required. The whatwg/usb repository alone is insufficient to answer those questions.

Browser support and permission gaps in whatwg/usb

The clearest limitation is browser coverage. The README names Chromium-based browsers across Android, ChromeOS, Linux, macOS, and Windows. It does not list Safari or Firefox as supported implementations. A web application that presents one interface to every browser cannot treat WebUSB as a universally available platform feature based on this documentation.

Hardware compatibility is a second unresolved boundary. The project provides demos for cameras, Arduino boards, Android devices, lighting equipment, and firmware targets, but the README does not provide a compatibility matrix. It also does not explain whether a device works solely because it uses USB or because it implements a supported interface. The presence of `blocklist.txt` shows that restrictions exist somewhere in the specification area, although the README does not explain the current rules.

The Editor's Draft status creates another engineering constraint. A draft can change, and the repository has no GitHub releases that give application developers a simple release identifier. Teams that require a fixed contract would need to record the specification state they implemented and review later changes. The repository does not document a version pinning or compatibility policy for consumers.

Finally, WebUSB is the wrong abstraction when the target device requires a native driver, a non-WebUSB browser, or an operating-system integration outside the documented platform set. A native USB stack may be required, but this review does not claim that a particular native library supports the device. The correct choice depends on whether page-level access is essential and whether the product can require Chromium-based browsers.

WebUSB compared with a native USB application

The real alternative is a native application or browser-hosted application that communicates with USB through an operating-system or native-device stack. The difference is not simply "older versus newer." WebUSB places the hardware-facing API in a web platform context, while a native approach can use platform-specific integration outside the browser security and permission model.

A native route is more appropriate when the application must run beyond Chromium-based browsers, target an operating-system integration not documented by whatwg/usb, or depend on device behaviour that the WebUSB draft does not cover. It also avoids treating a draft browser API as the only application interface, although it introduces platform-specific application packaging and device communication work.

The WebUSB route is more appropriate when the application benefits from web delivery, the target population already uses supported Chromium-based browsers, and the hardware workflow matches the documented examples. The README's demos provide evidence that WebUSB has been used for categories such as Arduino control and firmware upgrade, but they do not establish support for an arbitrary new device.

The Node.js `usb` package is another approach for environments outside a browser. It exports a `WebUSB` object according to the README, but it belongs to a separate repository. Teams should compare its documented interface with the browser specification rather than assuming that matching names imply identical lifecycle or permission semantics.

Licence, repository activity, and specification maintenance

The repository is classified as using a custom licence that GitHub cannot place in one of its standard categories. The relevant file is `LICENSE.md`. This review cannot state permitted or prohibited uses without the licence text, and it does not provide legal advice. Projects that intend to copy specification text, distribute a derived specification, or incorporate implementation material should inspect `LICENSE.md` directly and resolve any compliance question through their own review process.

The repository is not archived. Its last push was on 2026-06-05. That date is recent enough to avoid treating it as abandoned, but repository activity alone does not prove stable APIs or release discipline. There are no GitHub releases, and the linked specification is labeled an Editor's Draft. The best maintenance description is therefore factual: work is occurring in the repository while the public contract remains a draft.

Upgrade cost depends on specification changes and target device testing. The separate Test API specification and `test/` directory show testing is part of the project, but the README provides no compatibility policy, release tags, migration guide, or schedule. Consumers should identify the exact draft text their implementation follows, track changes to the specification source in `index.bs`, and validate expected behaviour in each Chromium-based operating system listed by the README.

Editorial conclusion

Adopt whatwg/usb when the target browser is Chromium-based and the product needs page-level access to compatible USB hardware. Do not treat this repository as a runtime library or assume Safari and Firefox support from the README. Before implementation, verify the required WebUSB operations against the current specification, test the intended device in the target operating systems, and review `LICENSE.md` because the repository uses a custom licence.

Frequently asked questions

Which browsers support whatwg/usb?

The README states that WebUSB is available in Chromium-based browsers for Android, ChromeOS, Linux, macOS, and Windows, beginning with Chrome 61. It does not list support for other browser engines.

How do I install WebUSB?

The whatwg/usb README provides no installation command because the repository publishes specifications rather than a browser runtime package. Chromium-based browser support is documented, while Node.js users are directed to the separate `usb` package.

Does whatwg/usb provide a Node.js WebUSB implementation?

Not according to the repository README. It directs Node.js users to the separate `node-usb/node-usb` package, which reportedly exports a `WebUSB` object.

Official sources

  1. Issues
  2. Project website
  3. README
  4. whatwg/usb on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/whatwg-usb.svg)](https://hysenlabs.com/projects/whatwg-usb)