Online Piano
Play a virtual piano with your mouse, a touchscreen or your computer keyboard. Pick a sound, hold the sustain pedal, and play chords — right in your browser.
Keyboard controls
White keys: A S D F G H J K · Black keys: W E T Y U · Octave: Z / X · Sustain pedal: Shift
How the Online Piano works
This online piano turns your device into a playable keyboard. Click or tap the keys, or play with your computer keyboard — the letters A S D F G H J K are the white keys and W E T Y U the black keys, with Z and X to change octave. It is polyphonic, so hold several keys to play chords, and holding Shift works like a sustain pedal. The sound is synthesised on your device with the Web Audio API, so there is nothing to install and nothing is uploaded. Tuning a real instrument instead? Try the Guitar Tuner, keep time with the Metronome, or look up voicings with the Chord Finder.
Computer keyboard mapping
You can play this piano from your typing keyboard. The home row runs up the white keys and the row above it gives you the sharps and flats, laid out so the black keys sit where you would expect them on a real keyboard. Press Z or X to shift down or up an octave, and hold Shift for sustain.
| Key | Note | Semitones |
|---|---|---|
| A | C | +0 |
| W | C♯ / D♭ | +1 |
| S | D | +2 |
| E | D♯ / E♭ | +3 |
| D | E | +4 |
| F | F | +5 |
| T | F♯ / G♭ | +6 |
| G | G | +7 |
| Y | G♯ / A♭ | +8 |
| H | A | +9 |
| U | A♯ / B♭ | +10 |
| J | B | +11 |
| K | C (next octave) | +12 |
| O | C♯ / D♭ | +13 |
| L | D | +14 |
| P | D♯ / E♭ | +15 |
| ; | E | +16 |
Middle octave frequencies
| Note | MIDI | Frequency | |
|---|---|---|---|
| C4 | 60 | 261.63 Hz | |
| D4 | 62 | 293.66 Hz | |
| E4 | 64 | 329.63 Hz | |
| F4 | 65 | 349.23 Hz | |
| G4 | 67 | 392.00 Hz | |
| A4 | 69 | 440.00 Hz | the tuning reference |
| B4 | 71 | 493.88 Hz |
Frequently Asked Questions
How do I play the online piano with my keyboard?
Use the middle and bottom letter rows: A S D F G H J K play the white keys (C, D, E, F, G, A, B, C) and W E T Y U play the black keys. Press Z or X to shift down or up an octave. You can also click keys with the mouse or tap them on a touchscreen, and play several notes at once.
Is the piano free and does it need an app?
The online piano is completely free with no sign-up and nothing to install. It runs entirely in your browser using the Web Audio API, so the sound is generated on your device. After the page loads it works offline, and nothing you play is uploaded. There is no app, no sign-up and no payment at any point. It is an ordinary web page that synthesises every note on your device with the Web Audio API, so nothing is downloaded as audio and nothing you play is sent anywhere. Once the page has loaded it keeps working without a network connection.
What sounds can I choose?
You can switch between a layered piano-style tone and simpler synth voices (sine, triangle, square and sawtooth). Each has its own character — the piano voice has a soft attack and decay, while the synth voices sustain more evenly. Turn sustain on to let notes ring after you release a key.
Can I play chords?
Yes — the piano is polyphonic, so you can hold multiple keys — on the keyboard, with the mouse, or with several fingers on a touchscreen — to play chords. Holding Shift acts as a sustain pedal while you build a chord. Yes — the piano is fully polyphonic, so you can hold several notes at once with the mouse, with multiple fingers on a touchscreen, or by pressing several computer keys together. Hold Shift to sustain the notes you are playing, which lets you build a chord one note at a time and let it ring while you add the rest.
Last updated: