Virtual piano keyboard with large key labels

Play a piano in your browser with touch chords, computer keys, sustain and a record and play back button. No downloads.

A virtual piano keyboard is a piano you play with the computer keyboard, and the hard part is remembering which letter plays which note. This page opens with large labels turned on, so each piano key shows its computer key in a big, clear letter, and its note name below it. The home row A S D F G H J K L ; and the quote key play the white keys from the lowest C, and the row above, W E T Y U O P, plays the black keys. Learn a tune by looking at the screen, then try to play it without looking. Press Z or X to change octave if a song goes out of range, and hold Shift for sustain. The large labels take more room, so on a small phone fewer letters fit and the page shows 1.5 octaves, so use it on a tablet or computer for the best view. You can turn the large labels off in the options, or switch the note labels to do re mi if you read solfege, and the choice is saved in this browser.

How it works

  1. Tap the keys, or press A W S E D F on a keyboard
  2. Turn on sustain, or hold Shift
  3. Record a riff and play it back

How to play the online piano

Tap or click the keys to play, or use your computer keyboard: this online piano plays the white keys on the home row and the black keys on the row above. The letters A S D F G H J K L ; ' are the white keys from the lowest C, and W E T Y U O P are the black keys between them, so A is C, W is C sharp, S is D, E is D sharp, and so on up to F one octave and a half higher. The letters are printed on the keys. Press Z or X to move down or up an octave. On a phone you can press several keys at once, so chords work, and you can slide a finger across the keys to glide on a computer, and on a phone a sideways drag scrolls the keyboard. The keyboard shows two octaves on a phone held upright, with white keys at least 44 pixels wide so it scrolls sideways inside its own box, and two or more on a wide screen, and the octave buttons move the range across the full 88-key span from A0 to C8.

Sustain, labels and volume

Sustain works like the right pedal of a piano. Turn on the Sustain box, or hold Shift, and notes keep ringing after you let go of the key until they fade out on their own. Without it, a note stops soon after you release the key. The Note labels choice puts C D E letters on the white keys, do re mi syllables, or nothing. Only the C keys carry an octave number, such as C4 for middle C, which helps you find your place. Large labels makes the key letters and note names bigger. The volume slider sets the piano's own level on top of your device volume. When several notes play at once the sound is limited so chords do not clip.

How the sound is made

There are no recorded samples. Each note is built in your browser with Web Audio: two slightly detuned oscillators play a stack of harmonics, a quick attack of about 6 milliseconds gives the hammer-like start, and the note then fades away exponentially. Low notes ring for up to seven seconds and high notes for about one, as on a real piano. A filter that closes as the note fades makes the tone soften, as a struck string does. It sounds like a synthesised piano and not like a concert grand, and we do not claim otherwise. The trade is that the page is tiny, loads at once and starts at once. Audio only starts after your first tap or key press, because browsers do not allow a page to make sound before that. The sound engine goes to sleep after a few idle seconds.

Recording and limits

Press Record, play a riff, and press Stop recording. The play back button replays your notes with the same timing and lights the keys. A recording holds up to 4000 note events (a press and a release count as one each, so about 2000 notes) or five minutes, and it stops with a notice when it reaches either limit, stays in the memory of this tab only, and is lost when you close or reload the page. There is no export. The piano has no velocity sensitivity, because a screen cannot tell how hard you press, so every note plays at the same strength. Keys are narrow on a small phone, so rest a finger near the middle of a key. Some phones add a short delay to audio, and a Bluetooth speaker adds more, so for the quickest response use wired headphones. Your octave, labels, volume and sustain choice are saved in this browser. Nothing you play is uploaded, and the page counts visits with Google Analytics, never what you played.

Frequently asked questions

Which computer key plays middle C?

With the default range C3 to C5, the K key plays middle C (C4), one octave above A. Press X to move the range up one octave, and then A plays C4. The piano keys show the letters, so you can look.

How do I make the key letters smaller again?

Open Labels, volume and display, and untick Large labels. You can also hide the computer letters with Show computer keys on the piano. Your choice is saved in this browser for the next visit.

How do I play the online piano with my computer keyboard?

Press A S D F G H J K for the white keys C D E F G A B C, and W E T Y U for the black keys C sharp, D sharp, F sharp, G sharp and A sharp. Z lowers the octave and X raises it. The letters are printed on the keys.

Can I play chords on my phone?

Yes. The piano reads every finger separately, so you can press three or four keys at once, such as C, E and G for a C major chord. You can also slide one finger across the keys to glide through notes.

How many octaves are shown?

15 white keys (two octaves, each at least 44 pixels wide, scrolling sideways) on a phone held upright and 2 or more (15 to 22 white keys) on wider screens. The Octave buttons move the range anywhere between A0 and C8, the 88-key span of a full piano.

What does the sustain option do?

It lets notes keep ringing after you release the key, like the right pedal on a piano. Tick the Sustain box to keep it on, or hold Shift for as long as you want it. Notes still fade out by themselves.

Is this a real piano sound?

No. It is a synthesised sound made with Web Audio from several harmonics with a fast attack and an exponential decay. It is piano-like, not a sampled grand piano. In return nothing has to download and it starts at once.

Can I save or share what I record?

Not yet. A recording of up to 4000 note events (about 2000 notes, since a press and a release count separately) or five minutes lives in this tab's memory so you can play it back, and it is gone when you reload or close the page. Nothing is uploaded.