Use an Xbox or PlayStation controller in your browser
Xbox, DualShock 4 and DualSense controllers work in Chrome, Edge, Firefox and Safari on Windows and Mac, over a cable or Bluetooth. Connect yours, then press a button: the tester below shows what your browser sees.
Controller tester
- Browser id
- –
- USB ID
- –
- Layout
- –
- Game sees
- –
Connect an Xbox controller
Windows
Cable: plug it in with a USB cable. Nothing else to set up.
Bluetooth (Xbox One S and newer): turn the controller on, then hold the small pair button on top until the Xbox button flashes fast.
Open Settings → Bluetooth & devices → Add device → Bluetooth.
Pick Xbox Wireless Controller.
Xbox Wireless Adapter: plug it in, press its button, then the pair button on the controller.
Mac
Hold the pair button on top until the Xbox button flashes fast.
Open System Settings → Bluetooth.
Press Connect next to Xbox Wireless Controller.
Only Bluetooth models pair with a Mac (Xbox One S, Elite Series 2, Series X|S). Over a USB cable, Chrome reads Xbox One and Series controllers by itself; Safari and Firefox need Bluetooth.
Connect a PlayStation controller
Cable: a USB cable works on Windows and Mac with no setup. For Bluetooth, put the controller in pairing mode first:
DualSense (PS5)
Hold Create and PS together until the lights around the touchpad flash.
DualShock 4 (PS4)
Hold Share and PS together until the light bar flashes.
Windows: Settings → Bluetooth & devices → Add device → Bluetooth. Mac: System Settings → Bluetooth.
Pick the controller. Windows lists both as Wireless Controller; a Mac shows DUALSHOCK 4 Wireless Controller or DualSense Wireless Controller.
The light stops flashing and stays on. Press a button on this page to check it.
Rumble on PlayStation controllers. A DualShock 4 rumbles in Chrome and Edge. A DualSense may not rumble in the browser; driving still works.
Controller not detected
Go down the list and test after each step.
- Press a button with this page open. Browsers hide controllers from a page until you press something, so nothing shows before that.
- Close Steam, then reload the page. When Steam is open it can take over the controller.
- DS4Windows shows two controllers. It adds a virtual Xbox pad next to the real one, so every press counts twice. Turn on HidHide in DS4Windows, or quit DS4Windows. The browser reads PlayStation controllers directly.
- Swap Bluetooth for a cable to tell a pairing problem from a controller problem.
- Unplug other controllers. A wheel, flight stick or second pad can take the controller slot the game reads.
Still stuck? Press Copy report in the tester and send it to us. It holds the exact IDs we need, and no personal data.
Controller IDs
Every controller reports a USB vendor and product ID, written as vendor:product in hex. Microsoft is 045e, Sony is 054c. The tester reads it from the browser's id string.
| Controller | USB ID | Connection |
|---|---|---|
| Xbox 360 | 045e:028e | USB cable |
| Xbox 360 Wireless Receiver | 045e:0719 | USB receiver |
| Xbox One | 045e:02d1, 045e:02dd | USB |
| Xbox One S | 045e:02ea | USB |
| Xbox One S | 045e:02e0, 045e:02fd, 045e:0b20 | Bluetooth |
| Xbox Elite Series 2 | 045e:0b00 | USB |
| Xbox Elite Series 2 | 045e:0b05 | Bluetooth |
| Xbox Series X|S | 045e:0b12 | USB |
| Xbox Series X|S | 045e:0b13 | Bluetooth |
| Xbox Wireless Adapter | 045e:02fe | USB adapter |
| DualShock 4, first model (CUH-ZCT1) | 054c:05c4 | USB, Bluetooth |
| DualShock 4, second model (CUH-ZCT2) | 054c:09cc | USB, Bluetooth |
| DualShock 4 USB Wireless Adapter | 054c:0ba0 | USB adapter |
| DualSense (PS5) | 054c:0ce6 | USB, Bluetooth |
| DualSense Edge | 054c:0df2 | USB, Bluetooth |
How each browser names a controller
| Browser | id string, example |
|---|---|
| Chrome, Edge on Windows (Xbox) | Xbox 360 Controller (XInput STANDARD GAMEPAD) |
| Chrome, Edge on Mac, and PlayStation pads on Windows | DualSense Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 0ce6) |
| Firefox | 054c-0ce6-DualSense Wireless Controller |
| Firefox on Windows (Xbox) | xinput |
| Safari | … Extended Gamepad |
For developers: what a Godot web game sees, and SDL GUIDs
A Godot 4 web build doesn't use SDL GUIDs. When the browser gives a controller the standard layout, Godot's controller GUID is the literal string standard; otherwise it is the OS plus vendor and product, for example Windows054c05c4. That is the “Game sees” line in the tester, and the only key Input.add_joy_mapping() can match on the web.
Desktop builds use SDL GUIDs from SDL_GameControllerDB. Layout: bus (03 USB, 05 Bluetooth), name CRC, vendor and product little-endian, version.
| Controller | Windows SDL GUID |
|---|---|
| Xbox 360 | 030000005e0400008e02000000000000 |
| Xbox One | 030000005e040000d102000000000000 |
| Xbox One S, Bluetooth | 030000005e040000fd02000000000000 |
| Xbox Series, Bluetooth | 030000005e040000130b000000000000 |
| DualShock 4, first model | 030000004c050000c405000000000000 |
| DualShock 4, second model | 030000004c050000cc09000000000000 |
| DualSense | 030000004c050000e60c000000000000 |
Questions
Why doesn't my browser see my controller?
Browsers hide controllers until you press a button while the page is open. Press any button. If it still doesn't appear, close Steam and DS4Windows, reconnect the controller and reload the page.
Does a PS5 DualSense controller work in Chrome?
Yes. Chrome, Edge and Firefox map the DualSense to the standard layout over USB and Bluetooth on Windows and Mac.
Why doesn't my controller vibrate in Firefox?
Firefox has no vibration support for web pages. Chrome, Edge and Safari do.
Can I use a Nintendo Switch Pro Controller?
Yes. Chrome and Firefox map it to the standard layout (USB ID 057e:2009). The buttons are labelled differently: the game's handbrake is the button where Xbox has A, which is B on a Switch controller.