Skip to main content
NyankoTools

Virtual Piano: Play Online with Your Keyboard or Touch Screen

A piano you can play with your computer keyboard, mouse or touch screen. Pick one of four sounds and play as many notes at once as you like. To check the pitch of a real instrument, try the Instrument Tuner. Sound is generated in your browser and nothing is sent anywhere.

🔒 Runs in your browser · Your data is never sent to a server

Octave

Click or tap the keys, or press Z S X D C V … and Q 2 W 3 E R … on your keyboard to play.

How to use

  1. Choose a "Sound". "Piano-like" is a good place to start.
  2. Click or tap the on-screen keys, or press Z to M (lower notes) and Q to P (higher notes) on your keyboard.
  3. Change the pitch range with the − / + buttons next to "Octave".
  4. If it is too loud or too quiet, adjust the "Volume" slider.

Notes

  • Browsers block audio until you interact with the page, so click, tap or press a key once before expecting sound.
  • How many keys you can hold at once depends on your keyboard hardware (ghosting protection). Many laptops manage only about 3 to 6.
  • On a phone you can scroll the keyboard sideways. When a scroll starts, any key you were holding is released.
  • The sounds are synthesised in the browser, not recordings of a real piano. Treat the timbres as approximations.
  • Key presses with Ctrl, Alt or Command held, or while a field or menu is focused, are not treated as playing, so browser shortcuts keep working.
  • On phones and tablets, silent mode or the device volume can keep the page silent.

Glossary

Octave

The interval between two notes with the same name, where the frequency doubles or halves. From one C to the next C is one octave. This keyboard spans just over three octaves.

Square and sawtooth waves

Waveforms common in synthesizers. A square wave has a hollow, buzzy tone and a sawtooth is bright with many overtones. A sine wave has no overtones and is the purest sound.

Envelope (ADSR)

How the loudness of a note changes over time: attack (rise), decay (fall), sustain (held level) and release (tail after you let go). The piano-like sound fades gradually while you hold the key.

MIDI note number

A number from 0 to 127 for pitch. Middle C (C4) is 60 and A4 is 69; each step up is one semitone.

FAQ

I hear no sound.

Browsers do not allow audio until you interact with the page, so click or tap a key, or press a key on your keyboard, once. If it is still silent, check the device volume, silent mode and whether the browser tab is muted.

Which computer keys play which notes?

The bottom row Z S X D C V G B H N J M plays the first octave starting from the leftmost C (the black keys are S D G H J), and the top row Q 2 W 3 E R 5 T 6 Y 7 U … P continues one octave higher. Tick "Show keyboard shortcuts" to see the key on each piano key. Keys are matched by physical position, so QWERTY and other layouts play the same notes.

Some notes drop out when I play a chord on the keyboard.

Keyboards limit how many keys, and which combinations, can be pressed at once (ghosting protection); many laptops allow only about 3 to 6. Play chords by touching several on-screen keys with different fingers, or use a gaming keyboard that handles many simultaneous keys.

What is the difference between the sounds?

"Piano-like" stacks overtones on the fundamental and fades gradually after a sharp start. "Sine" is a pure tone with no overtones, while "Square" and "Sawtooth" are the harder and brighter tones of electronic instruments. All are synthesised in your browser, not recorded from a real piano.

Do browser shortcuts such as Ctrl+C still work?

Yes. Keys pressed together with Ctrl, Alt or Command are not treated as playing, so copy, reload and similar shortcuts work as usual. When the cursor is in a field or menu on the page, typing takes priority over playing.

Share this page

↑↓ Select Enter Open Esc Close