Last updated: March 2026
How to Play Piano Online
This virtual piano turns your computer into a playable instrument using the Web Audio API for real-time sound synthesis. No downloads, no plugins, no samples to load. Every note is generated mathematically using harmonic overtones that simulate the physics of real piano strings vibrating.
Your keyboard's home row (A through L) maps naturally to white piano keys, while the upper row handles sharps and flats. The layout mirrors the physical spacing of a real piano, making it intuitive to learn and play melodies once you get the finger positioning down.
Understanding Piano Sound Synthesis
A real piano note isn't a single frequency. When you strike a piano key, the string vibrates at a fundamental frequency plus multiple harmonics (whole-number multiples of the fundamental). Our Grand Piano sound uses six harmonics with decreasing amplitude to create that rich, warm tone.
The four instruments each use different synthesis techniques. The Electric Piano uses triangle waves for a softer attack. The Organ maintains constant volume without decay, mimicking pipe organ behavior. The Synth uses a sawtooth wave through a lowpass filter that sweeps down over time for that classic analog synthesizer sound.
Learning Songs on Virtual Piano
Song Mode is designed to help absolute beginners play recognizable melodies within minutes. The tool highlights the next key you need to press, so you never have to read sheet music or memorize note sequences upfront.
Start with simpler songs like "Mary Had a Little Lamb" or "Twinkle Twinkle" which use only white keys in a narrow range. Once comfortable, try "Fur Elise" which introduces black keys and wider intervals. Reduce speed to 0.5x while learning, then gradually increase to full speed.
Recording your practice sessions and playing them back is a powerful learning technique. You can hear timing issues that are hard to notice while focused on hitting the right notes. Export as WAV to track your progress over time.
Frequently Asked Questions
Can I play this piano with my computer keyboard?
Yes. The home row keys (A through L) map to white keys (C4 through D5), and the upper row (W, E, T, Y, U, O, P) map to black keys. You can also click or tap keys directly on mobile devices.
What instruments are available?
Four instruments: Grand Piano with rich harmonics and long sustain, Electric Piano with a shorter mellow tone, Organ with sustained sound and no decay, and Synth with a sawtooth wave and lowpass filter.
How does the recording feature work?
Click Record, play your notes, then click Stop. You can play back your recording with animated keys, or download it as a WAV audio file or JSON data file. Recordings are limited to 2 minutes.
What is Song Mode?
Song Mode highlights the next key you need to press for pre-loaded melodies like Twinkle Twinkle, Happy Birthday, and Fur Elise. You can also listen to the full song at adjustable speeds (0.5x to 1.5x) to learn at your pace.
How does the sustain pedal work?
Press the Space bar to toggle the sustain pedal on or off. When sustain is on, notes ring for much longer, simulating the behavior of a real piano sustain pedal that lifts the dampers off the strings.
Can I change the octave range?
Yes. Use the octave shift buttons to move up or down, and choose between 2, 3, or 4 visible octaves. The keyboard shortcuts always map to the first two visible octaves.