Support for WebHID
- Category
- Device
- Type
- New or changed feature
- Status
- Enabled by default (Chrome 158)
- Intent stage
- Shipped
WPT details: External web-platform-tests (https://wpt.fyi/results/webhid) verify IDL exposure and permissions policy, but do not exercise the full API because WPT cannot simulate connected HID devices. Device enumeration, report I/O, and permissions UI are covered by Chromium's internal web tests (wpt_internal/hid/) as well as Chromium unit, browser, and Android instrumentation tests.
Summary
The [WebHID API](https://developer.chrome.com/docs/extensions/how-to/web-platform/webhid) enables web applications to interact with Human Interface Devices (HIDs) over USB and Bluetooth beyond standard system input mappings (such as mice, keyboards, touchscreens, and standard gamepads). Web applications can request user permission to connect to HID devices, send and receive input, output, and feature reports, and inspect report descriptors. WebHID shipped on [desktop platforms](https://developer.chrome.com/docs/capabilities/web-apis/hid-examples) (Windows, macOS, Linux, and ChromeOS) in Chrome 89. Chrome 158 brings the existing WebHID API to Chrome on Android (relying on new OS support in Android 17 / API level 37 and later) with no changes to the web-exposed API surface. Popular uses today include customizing mechanical keyboards, keypads, and gaming mice, calibrating gamepads, and integrating hardware headset call controls in call centers. WebView is not supported, as it does not have a device chooser UI or permissions UX controls. This feature can be controlled using the following enterprise policies: * [DefaultWebHidGuardSetting](https://chromeenterprise.google/policies/#DefaultWebHidGuardSetting) * [WebHidAllowAllDevicesForUrls](https://chromeenterprise.google/policies/#WebHidAllowAllDevicesForUrls) * [WebHidAllowDevicesForUrls](https://chromeenterprise.google/policies/#WebHidAllowDevicesForUrls) * [WebHidAllowDevicesWithHidUsagesForUrls](https://chromeenterprise.google/policies/#WebHidAllowDevicesWithHidUsagesForUrls) * [WebHidAskForUrls](https://chromeenterprise.google/policies/#WebHidAskForUrls) * [WebHidBlockedForUrls](https://chromeenterprise.google/policies/#WebHidBlockedForUrls) For more details, see [Set ChromeOS devices policies](https://support.google.com/chrome/a/answer/1375678) in the Chrome Enterprise and Education Help Center.
Standards & signals
- Specification: https://hid.spec.whatwg.org/
- Firefox: Negative
- Safari: Oppose
- Web developers: Strongly positive — USB headset vendors want to use WebHID to improve integration of call control features in web-based softphone applications (answer/reject/end call, microphone mute, redial, etc): https://developer.jabra.com/site/global/sdks/web/documentation/index.gsp Hobbyists are using WebHID to control niche devices like Razer Kraken Kitty: https://twitter.com/sarahemm/status/1314006489510666241
- Tracking bug: http://crbug.com/40628009
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=webhid
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Support%20for%20WebHID
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Support%20for%20WebHID
- Baseline status: https://webstatus.dev/?q=Support%20for%20WebHID
Docs: https://web.dev/hid/ https://web.dev/hid-examples/
Explainers: https://github.com/whatwg/hid/blob/main/EXPLAINER.md