Virtual Piano
Play with your mouse, touch, or computer keyboard (A–L row, with W/E/T/Y/U/O/P for the black keys). Extend the range or switch to a piano-like tone below.
Last updated
How to play the virtual piano
- Click or tap the keys, or use your computer keyboard: the A–L row for white keys and W, E, T, Y, U, O, P for black keys.
- Choose the tone and how many octaves are shown; hold Space for the sustain pedal.
- Click Connect MIDI keyboard to play with a real keyboard.
About this tool
The default "Grand piano (recorded)" tone plays real recordings of a Yamaha C5 grand from the Salamander Grand Piano set by Alexander Holm (CC BY 3.0). There's one sample every three semitones, and each note uses the nearest one, pitch-shifted slightly. The samples (about 1.5–2.6 MB, depending on the range shown) only download once you start playing, and until each arrives a synthesised piano fills in. The other tones are generated live with the Web Audio API. "Piano (synthesised)" layers slightly inharmonic harmonics with a hammer-strike transient.
The A S D F G H J K L ; row (with W E T Y U O P for the black keys) always plays C4 to E5. Hold Space, or tick "Sustain pedal", to let notes ring after you let go. Hold several keys for chords. Plug in a MIDI keyboard and press "Connect MIDI keyboard" to play every key with touch sensitivity and your sustain pedal (in browsers that support Web MIDI, such as Chrome and Edge).
Nothing here is recorded or uploaded — sound is generated and played entirely in your browser.
Questions about the virtual piano
Is it a real piano sound?
Yes. The default tone uses recordings of a Yamaha C5 grand piano from the Salamander Grand Piano set.
Can I connect a MIDI keyboard?
Yes, in browsers that support Web MIDI, such as Chrome and Edge. Click Connect MIDI keyboard.
How do I use the sustain pedal?
Tick Sustain pedal or hold the Space bar, so notes keep ringing after you let go.
How many octaves can I play?
Choose 1.5, 2.5 or 3.5 octaves, up to C3 to C6.