Testing

WebHID: Browser Support, API, Limitations

WebHID works in Chrome 89+, Edge 89+, and Opera 76+ on desktop. Firefox, Safari, and mobile browsers do not support it. Learn the API, limits, and quirks.

Author

Prince Dewani

May 1, 2026

WebHID is a JavaScript API from the Web Platform Incubator Community Group at the W3C that lets web pages talk to Human Interface Devices like gamepads, headsets, and exotic keyboards. It works in Chrome 89+, Edge 89+, and Opera 76+ on Windows, macOS, Linux, and ChromeOS, while Firefox, Safari on macOS, Safari on iOS, Chrome for Android, and Samsung Internet do not support it.

This guide covers what WebHID is, which browsers ship it, the key API features, how to connect to an HID device, and the known issues to plan around.

What is WebHID?

WebHID is a JavaScript API that gives a web page raw access to Human Interface Device reports over USB and Bluetooth, exposed through the navigator.hid object. The Web Platform Incubator Community Group at the W3C edits the spec, and Matt Reynolds at Google is the editor. WebHID first shipped in Chrome 89 in March 2021 to let web apps work with gamepads, joysticks, headsets, presenters, and other devices that lack a custom browser API.

Which browsers does WebHID support?

Chromium-based desktop browsers ship WebHID by default, while Firefox, Safari, and every mobile browser leave it out, so global browser support sits at about 27% as of April 2026.

Loading browser compatibility data...

WebHID compatibility in Chrome

Chrome supports WebHID from Chrome 89, released March 2, 2021, on Windows, macOS, Linux, and ChromeOS. Chrome 78 to 88 had WebHID disabled by default and needed the chrome://flags/#enable-experimental-web-platform-features flag. Chrome 4 to 77 did not support WebHID at all. Chrome for Android does not expose WebHID in any version.

WebHID compatibility in Edge

Microsoft Edge supports WebHID from Edge 89, released March 4, 2021, on Windows, macOS, and Linux. Edge 79 to 88 had WebHID behind the same Chromium experimental web platform features flag. Pre-Chromium EdgeHTML versions 12 to 78, and Internet Explorer, never added WebHID.

WebHID compatibility in Firefox

Firefox does not support WebHID in any version on Windows, macOS, Linux, or Android. Mozilla published a "harmful" standards position on the spec, citing user fingerprinting and device exposure risks. There is no about:config preference that turns WebHID on, and the Mozilla Connect ideas board still tracks open user requests for WebHID.

WebHID compatibility in Safari

Safari does not support WebHID on macOS or in Safari Technical Preview. Safari on iPadOS and iOS also lack support, including on iPad and iPhone running iOS 26.5. Apple WebKit has not published a public position on the spec, so a future Safari release may add it, but no engineer has been publicly assigned the work.

WebHID compatibility in Opera

Opera supports WebHID from Opera 76, released April 14, 2021, on Windows, macOS, and Linux, and tracks every Chromium release after that. Opera 66 to 75 had WebHID disabled by default. Opera 9 to 65 did not support WebHID. Opera Mobile and Opera Mini on Android and iOS do not expose WebHID in any version.

WebHID compatibility in Samsung Internet

Samsung Internet does not support WebHID in any version on Galaxy phones or tablets. Samsung Internet is built on Chromium, but Samsung disables the WebHID feature flag in its Android builds. There is no setting inside the Samsung Internet app that turns it on.

WebHID compatibility in Android Browser

Chrome for Android, Firefox for Android, and the legacy stock Android Browser do not support WebHID. The Android USB and HID stacks limit raw device access to apps with the USB host permission, so the WebHID team has not shipped Android support. Wrap an HID-aware web app inside a Trusted Web Activity if you need it on Android.

WebHID compatibility in Internet Explorer

Internet Explorer does not support WebHID in any version. The API depends on Chromium device service plumbing that EdgeHTML and Trident never had. Internet Explorer is end-of-life, so move HID-dependent web apps to Chromium-based Edge or Chrome for any new work.

What are the key features of WebHID?

WebHID gives a web page low-level access to HID input, output, and feature reports without a native driver, while keeping the user in control of every device handshake. The headline features focus on permissions, raw report I/O, and event-based device updates.

  • navigator.hid.requestDevice: Pops a browser-supplied device chooser on a click. The user picks a device from a filter list of vendor and product IDs, and the page only sees the device the user chose.
  • navigator.hid.getDevices: Returns the list of devices the user has already approved for the origin. The page never gets a free pass to enumerate hardware.
  • HIDDevice.open and HIDDevice.close: Open and close the device handle. Only one tab can hold the handle at a time, so the API surfaces a clear lifecycle.
  • sendReport, sendFeatureReport, receiveFeatureReport: Send output and feature reports to the device, and read feature reports back. Each call takes a report ID and a Uint8Array buffer.
  • inputreport event: Fires every time the device pushes an input report. The event carries data, reportId, and the originating HIDDevice.
  • connect and disconnect events: Fire on the navigator.hid object when an approved device is plugged in or unplugged. Pages can react to USB cable changes without polling.
  • HIDDevice.forget: Revokes the page's permission for that device. The next requestDevice call must show the chooser again.
  • Built-in blocklist: Generic keyboards, mice, pointer devices, and FIDO HID authenticators are blocked by Chrome at the browser layer. The page cannot bypass this list.
...

How do you connect to an HID device with WebHID?

You connect to an HID device by feature-detecting navigator.hid, calling requestDevice from a user gesture, opening the returned device, and listening for inputreport events. Every step has to run on a click or keypress because requestDevice requires user activation.

Use the filters argument to narrow the chooser to your hardware. A filter can match vendorId, productId, usagePage, and usage. The browser shows the user every device that matches at least one filter.

Paste this snippet into the DevTools console of Chrome, Edge, or Opera. Click anywhere on the page once and the device chooser opens.

// Paste this into the DevTools console to confirm WebHID support and request a device.
if ("hid" in navigator) {
  console.log("WebHID is available.");

  document.body.addEventListener("click", async () => {
    const filters = [{ vendorId: 0x057e }]; // example: any Nintendo HID device
    const devices = await navigator.hid.requestDevice({ filters });

    if (devices.length === 0) {
      console.log("No device selected.");
      return;
    }

    const device = devices[0];
    await device.open();
    console.log("Opened device:", device.productName);

    device.addEventListener("inputreport", (event) => {
      const { data, reportId } = event;
      console.log("Report", reportId, new Uint8Array(data.buffer));
    });
  }, { once: true });
} else {
  console.log("WebHID is not supported in this browser.");
}

If the console prints "WebHID is not supported in this browser", you are running Firefox, Safari, or a mobile Chromium browser. Fall back to a native helper app or a Trusted Web Activity for those visitors.

Note

Note: WebHID breaks across Firefox, Safari, and every mobile browser. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the known issues with WebHID?

WebHID has the smallest browser footprint of any modern device API. The painful edge cases tend to land on Firefox refusal, mobile gaps, and the user-gesture rule.

  • Firefox calls WebHID harmful: Mozilla flags WebHID as harmful in its standards position. Sites that need HID on Firefox must ship a native helper or guide users to Chrome or Edge.
  • No Safari, no iOS, no iPadOS: Safari on macOS, iPadOS, and iOS lack WebHID. iPad and iPhone visitors need a native app or a sidecar tool, since there is no flag to enable.
  • No Chrome for Android or Samsung Internet: Mobile Chromium builds disable the WebHID feature. Android visitors get a silent undefined when the page reads navigator.hid.
  • requestDevice must run on a user gesture: Chrome throws DOMException "Must be handling a user gesture" if you call requestDevice from a setTimeout, fetch callback, or page-load handler. Always wire it to a click or keypress.
  • Generic keyboards and mice are blocked: Chrome refuses to expose any device whose top-level usage matches a keyboard, mouse, pointer, or system multi-axis controller. The blocklist also covers FIDO HID authenticators.
  • Service workers cannot call requestDevice: Chrome extensions must call requestDevice from an extension page and pass the device handle to the service worker through messaging. The Chrome team documents this restriction in the WebHID extension guide.
  • Bluetooth HID needs OS pairing first: The browser only sees Bluetooth HID devices the operating system has already paired and connected. Pair your headset or controller in Windows, macOS, or ChromeOS settings before you call requestDevice.
  • One tab owns the device: Once a tab opens the device, no other tab can open it until the first tab calls close or is destroyed. Plan your UX so users do not race two pages onto the same gamepad.

In my experience, the trickiest failure is the user-gesture rule paired with React. A useEffect that calls requestDevice on mount throws every time, even after a real click somewhere else, because the browser has already lost the activation token by the time the effect runs. Wire requestDevice to an onClick handler on a real button and the problem disappears.

...

Citations

All WebHID version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests