How to play the online piano
- Mouse or touch: click or tap the keys. On a touch screen you can hold several keys for chords, and slide your finger across the keys to play a run.
- Computer keyboard: the middle letter row (A S D F G H J K L ;) plays the white keys, starting from the C at the left edge of the piano. The row above (W E T Y U O P) plays the black keys in between. Choose Labels: Computer keys to see which letter plays which key.
- Octaves: press Z to move down an octave and X to move up, or use the Octave buttons. The range shown between them tells you which notes are on screen.
- Sustain: hold the space bar, or switch on the Sustain button, to let notes ring after you release the keys, like the right pedal of a real piano.
- MIDI keyboard: connect a USB or Bluetooth MIDI keyboard and press Connect MIDI keyboard. All 88 notes play even if they are off screen, softer and harder playing changes the volume, and a sustain pedal plugged into the keyboard works. Nothing is installed; the browser only asks once for permission to use MIDI devices.
The keys work by position, so the layout is the same on QWERTY, AZERTY and other keyboards.
Finding the notes
The piano keyboard repeats the same pattern of twelve notes. The white keys are named C, D, E, F, G, A and B; the black keys are the sharps and flats in between, such as C♯ (also called D♭). Look for the groups of two and three black keys: the white key just left of each group of two is a C. The C in the middle of a full piano is called middle C, or C4, and the A above it, A4, is the note orchestras tune to at 440 Hz.
With labels set to note names, every white key shows its name and octave number. Start the visible keys at C4 with the Octave buttons to find middle C at the left edge.
Easy first melodies
These well-known tunes use only white keys, starting from middle C:
- Mary Had a Little Lamb: E D C D E E E · D D D · E G G · E D C D E E E E D D E D C.
- Twinkle, Twinkle, Little Star: C C G G A A G · F F E E D D C.
- Ode to Joy: E E F G G F E D C C D E E D D.
With the piano starting at C4, C is the A key, D is S, E is D, F is F, G is G and A is H on your computer keyboard.
Playing chords
A basic chord is three notes played together, using every other white key. C major is C, E and G (letters A, D and G). F major is F, A and C (F, H and K), and G major is G, B and D (G, J and L). Those three chords alone are enough to accompany a huge number of songs. A minor (A, C and E) adds a sadder sound. Hold the space bar while changing chords so they blend smoothly.
Scales to practise
- C major: C D E F G A B C, all white keys. On the computer keyboard that is A S D F G H J K.
- A minor (natural): the same white keys, but starting and ending on A: A B C D E F G A. Starting on a different note gives the same keys a darker, sadder sound.
- G major: G A B C D E F♯ G. It is the first scale with a black key: F♯ is the black key just right of F.
- The chromatic scale: every key in a row, white and black, from one C to the next. It is a good way to learn where all twelve notes are.
Playing with both hands
On a real piano the right hand usually plays the melody and the left hand plays chords or bass notes lower down. On a touch screen you can do the same with two hands. On a computer keyboard, play the melody with your right hand on the letter keys and press the chord’s lowest note with your left, or hold the space bar for sustain and play the chord first, then the melody.
Online piano or a real piano?
An online piano is perfect for trying out melodies, working out the notes of a song, learning note names and chords, and quick practice when no instrument is nearby. A computer keyboard can’t play loud and soft, though, and it only covers about an octave and a half at a time. If you enjoy playing, a digital piano with 88 weighted keys and a sustain pedal is the next step: it feels like an acoustic piano, responds to how hard you play and can be used with headphones.
Practice tips
- Play slowly and evenly before trying to play fast. A steady beat from the metronome helps.
- Use one finger per key: thumb on C, then each finger on the next white key, so your hand stays in one place.
- Record yourself with the voice recorder and listen back.
- Learn to read the notes you play with the note reading trainer, and to hear them with ear training drills.
- A computer keyboard is a great way to learn notes and melodies; for building finger technique, a real or digital piano with weighted keys is worth it later on.
About the piano sound
The sound is a recording of a real Yamaha C5 grand piano: the Salamander Grand Piano by Alexander Holm, used under the Creative Commons Attribution 3.0 licence, here in a compressed MP3 version. Notes were recorded every few keys; each key plays the nearest recording, pitched up or down by at most a semitone. Only the notes near the visible keys are loaded, which keeps the page fast. If you hear nothing, check that your device isn’t muted and try the speaker test.
Frequently asked questions
How do I play the online piano with my computer keyboard?
The middle row of letters plays the white keys: A is C, S is D, D is E, F is F, G is G, H is A, J is B, then K, L and ; continue into the next octave. The row above plays the black keys: W, E, T, Y, U, O and P. Press Z or X to move down or up an octave, and hold the space bar for sustain.
Can I play it on a phone or tablet?
Yes. Tap the keys with your fingers; you can press several at once for chords and slide across the keys for a glissando. Held upright, a phone shows one octave with wide keys; turn it sideways to see more keys, and use the Octave buttons to reach higher or lower notes. Make sure the phone isn’t in silent mode.
Why is there a short delay when I press a key?
Every device needs a few milliseconds to turn a key press into sound. Bluetooth speakers and headphones add the most delay, often enough to notice; wired headphones or the built-in speakers respond fastest.
Where does the piano sound come from?
It is a real recording: the Salamander Grand Piano, a Yamaha grand sampled by Alexander Holm and shared under the Creative Commons Attribution 3.0 licence. Each key plays the closest recorded note, gently adjusted to the right pitch.
Can I connect a MIDI keyboard?
Yes, in Chrome, Edge, Opera and Firefox on a computer or Android. Plug in a USB or Bluetooth MIDI keyboard, press Connect MIDI keyboard and allow MIDI access. Every key plays, how hard you press changes the volume, and a sustain pedal works too. Safari does not support web MIDI, so the button does not appear there.
Does it work offline?
Once the page and the piano sound have loaded, the sound plays from your device, so short connection drops don’t interrupt playing. Moving to a new octave loads the notes for that part of the keyboard.