Virtual Piano – Play Piano Online with Your Keyboard

A free online piano that runs in your browser: two octaves mapped to your computer keyboard, multi-touch, sustain, note names, record and play back, and easy play-along tunes.

C3 – C5
SC#
ZC3
DD#
XD
CE
GF#
VF
HG#
BG
JA#
NA
MB
2C#
QC4
3D#
WD
EE
5F#
RF
6G#
TG
7A#
YA
UB
IC5
Visible keys
Note names

Press Record and play — your take is kept here.

Play along

Pick a tune and the next key lights up. Hit the right key to move on.

Playing with a computer keyboard

The bottom row Z to , (white keys) with S D G H J (black keys) plays the left octave; the top row Q to I with 2 3 5 6 7 plays the right octave. Use ← → to shift octaves and hold the spacebar for sustain.

To practise in time, open the metronome alongside.

How to play

Click the keys or tap them on your phone. You can press several keys at once for chords, and sliding a finger across the keys plays a glissando. Pressing nearer the bottom of a key plays it a little louder.

On a computer, two rows of your keyboard become two octaves:

Row White keys Black keys Range
Bottom Z X C V B N M S D G H J Left octave (C–B)
Top Q W E R T Y U I 2 3 5 6 7 Right octave (C to high C)

Use ← → to shift by an octave, and hold the spacebar for sustain, just like the right pedal on a real piano. Keys are read by position, so non-QWERTY layouts still map to the same physical keys.

Note names and octave numbers

Switch labels between C D E and Do Re Mi. The small number under each C is its octave: middle C is C4, and it is marked with a dot.

Pitches are tuned to A4 = 440 Hz, with each semitone a factor of the twelfth root of two (about 1.0595). That puts middle C at 440 × 2^(−9/12) ≈ 261.6 Hz, and the C above it at exactly double, 523.3 Hz.

Record, play back and play along

  • Record: press Record, play, and press it again. Every note is kept with its length and sustain, and playback lights up the keys as it goes. Your last take stays in this browser, even after a reload.
  • Play along: public-domain tunes — Twinkle Twinkle, Hänschen klein, Mary Had a Little Lamb and Ode to Joy. The next key glows yellow and advances when you hit it. Press Listen to hear the tune first.

On a phone

In portrait the piano shows one large octave; use ◀ ▶ to move around, or turn the phone sideways to see two or three octaves. On an iPhone, flip off the silent switch or Safari may stay quiet. Sound switches on with your first key press.

Related tools

Keep a metronome running to practise in time, use the tone generator for a reference frequency, or try the perfect pitch test to name notes by ear.