How to play the online piano
- Mouse or touch: click or tap a key. On a phone or tablet you can hold several keys at once for chords, and slide a finger across the keys for a glissando. Playing nearer the front edge of a key is a little louder, like striking it harder.
- Computer keyboard: the bottom letter row plays one octave and the top row the next one and a half — the letter on each key shows which key of your keyboard plays it. Hold keys together for chords.
- Octave: − and + (or the ← and → arrow keys) move the keyboard down or up an octave. The label shows the lowest C on screen; C4 is middle C.
- Sustain pedal: hold the space bar, or switch the pedal on with its button, and notes keep ringing after you let go of the keys — the way the right pedal of a real piano lifts the dampers.
- Sound, note names and volume: choose a grand piano, electric piano, organ or harpsichord; show the notes as C D E or Do Re Mi on the keys, or hide them.
The first sound may take a fraction of a second while the browser starts its audio engine; after that, each key plays as soon as you press it. For the lowest delay use wired headphones or speakers — Bluetooth often adds 100 milliseconds or more of its own.
Which computer key plays which note
The keys follow your keyboard’s physical positions, so they work on QWERTY, QWERTZ and AZERTY layouts alike. With the octave at C4:
| Row | Keys and notes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bottom row | Z | S | X | D | C | V | G | B | H | N | J | M |
| Note | C4 | C♯4 | D4 | D♯4 | E4 | F4 | F♯4 | G4 | G♯4 | A4 | A♯4 | B4 |
| Top row | Q | 2 | W | 3 | E | R | 5 | T | 6 | Y | 7 | U |
| Note | C5 | C♯5 | D5 | D♯5 | E5 | F5 | F♯5 | G5 | G♯5 | A5 | A♯5 | B5 |
After U, the keys I 9 O 0 P [ = ] continue with C6 to G6.
Learn a song: follow the highlighted key
Choose a melody under Learn a song. The next key to play lights up in amber and the strip above the keyboard shows every note; play the right key and the next one lights up — a wrong key simply doesn’t advance, so you can take your time. Listen to the melody plays it for you first. All six are in the public domain:
- Twinkle, Twinkle, Little Star — the French tune “Ah ! vous dirai-je, maman”, first printed in 1761; the English words are Jane Taylor’s poem of 1806.
- Mary Had a Little Lamb — Sarah Josepha Hale’s poem of 1830, sung to the tune used in American schools since the 1830s.
- Frère Jacques — a traditional French round, in print since the late 18th century.
- Ode to Joy — the main theme of the finale of Beethoven’s Ninth Symphony, first performed in 1824.
- Jingle Bells — James Lord Pierpont, published in 1857 as “One Horse Open Sleigh”.
- Für Elise — Beethoven’s piano piece of 1810, published in 1867; here the right hand of the famous opening.
The first five use only the white keys from C4 up and are the usual first pieces for beginners. Für Elise adds the black key D♯ and moves quickly between hands on a real piano, so practice it slowly.
Record what you play
Press Record, play, and press Stop recording. Play recording plays it back with the exact timing, including the sustain pedal — and with whichever sound is selected, so you can record on the piano and play it back on the organ. The recording lives only in this page and is gone when you close it; nothing is uploaded.
Playing with a MIDI keyboard
In Chrome, Edge and Opera on a computer or Android, plug in a USB MIDI keyboard and press Connect a MIDI keyboard; allow MIDI access when the browser asks. The page then plays every key you press with its velocity (how hard you hit it), and a sustain pedal plugged into the keyboard works too. Safari doesn’t support Web MIDI, so the button doesn’t appear there.
How the sounds are made
There are no recordings: every note is synthesized by your browser’s Web Audio engine the moment you play it.
- Grand piano: a piano string doesn’t vibrate in perfectly whole-number multiples of its pitch. Because steel wire is stiff, its overtones run slightly sharp — the inharmonicity described by Harvey Fletcher in 1964: the n-th partial lies at n × f × √(1 + B·n²), where B is small for long bass strings and larger for short treble strings. For middle C (261.63 Hz) this page uses B = 0.0004, which puts the 8th partial at 2,119.63 Hz instead of 2,093.00 Hz — 22 cents sharp. Each note adds up to 16 such partials. The hammer strikes the string about a seventh of the way along it, which silences the 7th partial, and a harder strike brings out more of the high partials. High partials fade faster than low ones and low notes ring longer than high ones; the first three partials are doubled by a second “string” tuned a hair sharp, for the slow shimmer of a real piano’s unison strings.
- Electric piano: frequency modulation (FM), the method behind the famous electric piano of the Yamaha DX7 synthesizer (1983): one sine wave bends the pitch of another, and a fast-fading high modulator adds the metallic “tine” attack.
- Organ: drawbar-style sine waves at the 16′, 8′, 5⅓′, 4′, 2⅔′, 2′, 1⅗′, 1⅓′ and 1′ pitches, in the manner of a tonewheel organ. It sounds as long as you hold the key, without fading.
- Harpsichord: a bright plucked tone whose high overtones fade first, as on a quill-plucked string. A harpsichord can’t play louder or softer, so the velocity doesn’t change it.
Note frequencies
The keys are tuned in equal temperament with A4 = 440 Hz (the ISO 16 standard pitch): each semitone up multiplies the frequency by the twelfth root of 2, about 1.0595. A full 88-key piano runs from A0 (27.50 Hz) to C8 (4,186.01 Hz).
| Note | C | C♯ | D | D♯ | E | F | F♯ | G | G♯ | A | A♯ | B |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Octave 3 | 130.81 | 138.59 | 146.83 | 155.56 | 164.81 | 174.61 | 185.00 | 196.00 | 207.65 | 220.00 | 233.08 | 246.94 |
| Octave 4 | 261.63 | 277.18 | 293.66 | 311.13 | 329.63 | 349.23 | 369.99 | 392.00 | 415.30 | 440.00 | 466.16 | 493.88 |
| Octave 5 | 523.25 | 554.37 | 587.33 | 622.25 | 659.26 | 698.46 | 739.99 | 783.99 | 830.61 | 880.00 | 932.33 | 987.77 |
Middle C is called C4 here, as in scientific pitch notation; some keyboard makers, Yamaha among them, call the same key C3. In solfège, C D E F G A B are Do Re Mi Fa Sol La Si.
Tips for practicing
- Learn a melody in small pieces: the first line until it is smooth, then the next.
- Keep a steady pulse with the online metronome, starting slowly.
- Use the piano to find notes when you tune by ear, then check with the guitar tuner.
- A virtual keyboard is good for learning notes and melodies; for technique — finger independence, touch, pedaling — nothing replaces a real or digital piano with weighted keys.
Frequently asked questions
Can I play chords on the computer keyboard?
Yes. Hold several keys together, for example Z C B for a C major chord (C E G). Many keyboards can only report a limited number of keys held at once, so a few combinations of four or more keys may drop a note — that is a limit of the keyboard hardware, not of the page; test yours with the keyboard tester.
Why is there a delay before the sound?
Usually the audio output: Bluetooth headphones and speakers add a noticeable delay. Wired headphones or the built-in speakers are much faster. On some phones the very first note starts the audio engine and may come late; after that the delay is short.
Does it work on phones and tablets?
Yes, with multi-touch for chords. Turn the phone sideways to see more keys, and use − and + to move between octaves. If you hear nothing on an iPhone, check the volume; the page asks Safari to play even with the ringer switch on silent, which works on recent versions.
Can I save my recording?
The recording stays in the page while it is open and can be played back with any of the four sounds. It is not stored or uploaded; to keep a performance as an audio file, play it back and record it with the voice recorder or another recording app.
Is the piano sound a sample of a real piano?
No. Every note is synthesized as you play from a physical model of a piano string’s overtones, so the page loads fast and uses no data for sound files.
Last updated: October 15, 2026