PianGo

How to use a MIDI keyboard in a web browser

To use a MIDI keyboard in a browser, connect it to the computer by USB (or pair it over Bluetooth), open the site in Chrome, Edge or desktop Firefox, and allow MIDI access when the browser asks. Safari, on a Mac, iPhone or iPad, does not support Web MIDI at all, so there you need an app or a microphone instead. If the keyboard is connected and nothing happens, the cause is almost always the browser, the permission, or another program holding the keyboard.

Last updated 12 November 2026. Browser support from the web-features explorer; permission rules from Chrome for Developers and MDN, all read on that date. We make PianGo, a free practice app that reads MIDI keyboards in the browser; what it does is taken from its own code.

The short answer

Web MIDI works in Chrome (since version 43), Edge (since 79) and Firefox on desktop (since 108), and in Chrome on Android. It does not work in Safari on any device or in Firefox for Android. The page must be served over HTTPS, and you must allow MIDI access when asked. Close any other music software that might be using the keyboard, then reload the page with the keyboard already plugged in.

Which browsers support a MIDI keyboard

Browsers talk to MIDI devices through the Web MIDI API. The web-features project, which tracks browser support for web platform features, rates it "limited availability", because one major engine has never shipped it.

Web MIDI support, from the web-features explorer, read 12 November 2026.
BrowserWeb MIDISinceWhat to do instead
Chrome (Windows, Mac, Linux, ChromeOS)Yes43, May 2015 
Chrome on AndroidYes43, May 2015A USB keyboard needs a USB-C or OTG adapter
EdgeYes79, January 2020 
Firefox (desktop)Yes108, December 2022 
Firefox for AndroidNo Use Chrome on the same phone or tablet
Safari (Mac)No Install Chrome or Edge on the Mac
Safari and every browser on iPhone and iPadNo Use a native app, or an app that listens through the microphone

The last row catches people out. On iPhone and iPad, Chrome and Edge are built on Safari's engine, so installing them does not add Web MIDI. For an iPad at the piano, either use an app from the App Store that reads MIDI directly, or a web app that can listen to the piano through the microphone; our page on piano apps and acoustic pianos explains how microphone listening works and where it struggles.

How to connect: a checklist

  1. Check the keyboard has MIDI out. A USB port marked "USB to host" (usually USB-B or USB-C) carries MIDI over the cable. Older keyboards with only round 5-pin MIDI sockets need a USB-MIDI interface. Bluetooth MIDI keyboards say so in their manual. Not sure yours is big enough? See how many keys you need.
  2. Connect it before opening the page. Plug the USB cable into the computer directly rather than through an unpowered hub. For Bluetooth MIDI, pair the keyboard with the computer's operating system first: a browser only sees MIDI ports the system already offers, and cannot tell a Bluetooth keyboard from a cabled one.
  3. Close other music software. A DAW, notation program or another browser tab may already be listening to the keyboard. On some systems, particularly Windows, a MIDI port can only be opened by one program at a time.
  4. Open the site in Chrome, Edge or desktop Firefox, over HTTPS. MDN notes the API is only available in a secure context, so a plain http:// page will not get MIDI access.
  5. Allow MIDI access. Since Chrome 124, Chrome asks permission for any MIDI use, not only for the advanced system-exclusive messages that needed it before. If you click Block, the site gets an error instead of your keyboard. Firefox asks in its own way too; MDN says the user must grant permission "through a user-agent specific mechanism".
  6. Choose MIDI in the site itself. Most music sites have an input setting; pick MIDI or your keyboard's name there.
  7. Press a key and watch the screen. If the site shows the note, you are done. Your keyboard's own speakers or headphones still make the sound; the site only receives which key and how hard.

When nothing happens: troubleshooting

Common faults and fixes. The browser behaviour is from the sources above; the hardware causes are general.
What you seeLikely causeFix
"This browser has no MIDI support" or no MIDI option at allSafari, an iPhone or iPad, or Firefox for AndroidSwitch to Chrome or Edge on a computer, or use the microphone
The site never asked permission and gets no keysYou blocked MIDI earlier for this siteClick the icon at the left of the address bar, open the site's settings, set the MIDI entry to Allow, then reload
Permission allowed, but no keyboard listedThe system does not see it: cable is charge-only, hub, or Bluetooth not pairedTry another cable and port; pair Bluetooth in the system settings first
Listed, but no notes arriveAnother program has the port, or the keyboard's local/MIDI settingsQuit other music apps and tabs; check the keyboard manual for a MIDI or USB mode
Keys stick or notes never stopA note-off was lost when the cable was pulled mid-noteReload the page; press the stuck key again
Works in one tab, not anotherEach site has its own permissionAllow MIDI separately for each site

MIDI or microphone?

If your keyboard has MIDI, use it. MIDI tells the site exactly which key went down, when, and how hard; a microphone has to work that out from sound, which is harder with chords, an out-of-tune piano or a noisy room. A microphone is the right choice when you have an acoustic piano, a keyboard with no MIDI out, or Safari. Our page on whether you can learn piano with an app sets out what either kind of input can and cannot check, such as which finger you used.

Using a MIDI keyboard in PianGo

We make PianGo, so here is exactly what it does with a MIDI keyboard, taken from its code. In the practice screen, open Settings, then Note detection, and choose MIDI ("Most accurate. Connect by USB or Bluetooth."). PianGo listens to every MIDI input the browser offers, so you do not have to pick a device, and shows "Connected:" followed by the keyboard's name, or "Waiting for a keyboard to be plugged in…" until one appears. It notices a keyboard plugged in or unplugged while the page is open. It reads key presses and releases, including keyboards that send a release as a note-on with no velocity, and keeps how hard each key was struck. It remembers your choice for the next piece.

If the browser has no Web MIDI, PianGo says so and suggests Chrome or Edge on a computer, or Mic on an iPad or iPhone. In wait-for-me mode it holds each step until you press the right keys; in play-along mode you set the tempo between 30 and 200 beats a minute and it scores the run. Either way it shows which finger to use from fingering planned for the whole piece; see piano fingering for how that works, and practising hands separately for the one-hand switch. Practising needs no account.

What it does not do: it does not read the sustain pedal or other controllers, and it does not play the notes you press back through the computer, because your keyboard already makes the sound.

Common questions

Does Safari support MIDI keyboards?

No. Safari has never shipped the Web MIDI API, on the Mac, iPhone or iPad. On a Mac, use Chrome, Edge or Firefox. On an iPhone or iPad every browser uses Safari's engine, so use an App Store app that reads MIDI, or a site that listens through the microphone.

Why does Chrome ask for permission to use MIDI devices?

Since Chrome 124 the whole Web MIDI API sits behind a permission prompt; before that, only advanced system-exclusive messages needed one. Allow it for sites you trust. If you blocked it by mistake, change it in the site's settings from the address bar and reload.

Can I use a Bluetooth MIDI keyboard in a browser?

Yes, in a browser that supports Web MIDI, once the keyboard is paired with the computer's operating system. The browser sees it as an ordinary MIDI port and cannot tell it apart from a cabled keyboard.

Does Firefox support Web MIDI?

Firefox on desktop does, from version 108, released in December 2022, and asks for your permission in its own way. Firefox for Android does not.

Why does my keyboard work in one site but not another?

Permission is granted per site, and some systems let only one program or tab use a MIDI port at a time. Allow MIDI for the second site, close the first tab and any music software, then reload.

Try your keyboard on a real piece

Open PianGo in Chrome or Edge, plug in your keyboard, choose MIDI under Note detection, and pick one of the 168 built-in pieces or your own MusicXML or MIDI file. It shows which key and which finger, then waits for you. Free, nothing to install.