Virtual Piano

61 keysFreeNo download

A free, browser-based instrument that turns your keyboard into a virtual piano. Play piano online with realistic synthesis, sustain pedal, and instant response.

1234567890QWERTYUIOPASDFGHJKLZXCVBNM⇧1⇧2⇧4⇧5⇧6⇧8⇧9⇧Q⇧W⇧E⇧T⇧Y⇧I⇧O⇧P⇧S⇧D⇧G⇧H⇧J⇧L⇧Z⇧C⇧V⇧B
Volume
70%
Sustain
Off
Key Labels
Showing keys
Note Names
Hidden
Try a Song
⇧ ShiftHold Shift + key to play black keys (sharps/flats)

White Keys (4 rows)

C2–E31234567890
F3–A4QWERTYUIOP
B4–C6ASDFGHJKL
D6–C7ZXCVBNM

Black Keys (Sharps)

⇧ Shift+any white key

Hold Shift and press a white key
to play its sharp (♯) note.

Press any key to play.

Hold Shift for sharps.

Toggle sustain below.

Features

Everything you need to play piano online

Realistic Synthesis

Web Audio API oscillator synthesis with harmonics and envelope shaping produces warm, piano-like tones with natural attack and decay.

Volume & Sustain

Adjust volume in real time and toggle the sustain pedal to let notes ring out naturally, just like a real piano.

Instant Play

No installation, no loading time. Open the page and start to play piano online immediately with your keyboard or mouse.

How to Play

How to play piano online with your keyboard

1

Start Playing

The virtual piano loads instantly — no downloads, no sign-up. Press any key on your keyboard or click the on-screen keys to play your first note.

2

Learn the Keys

Four rows of your keyboard span 5 octaves. 1–0 plays C2–E3, Q–P plays F3–A4, A–L plays B4–C6, and Z–M plays D6–C7. Hold Shift + any key for sharps.

3

Customize Sound

Toggle the sustain pedal to let notes ring out after you release the keys. Adjust volume to shape your piano online experience.

Keyboard Mapping

C2–E31 2 3 4 5 6 7 8 9 0
F3–A4Q W E R T Y U I O P
B4–C6A S D F G H J K L
D6–C7Z X C V B N M
Sharps ♯Shift + any key above
CompatibleMac · Windows · Linux
What is a Piano

What is a piano? History & how it works

The piano is a keyboard instrument invented by Bartolomeo Cristofori around 1700 in Italy. It produces sound when hammers strike steel strings, giving the player dynamic control over volume through touch — hence its original name, pianoforte (soft-loud).

With 88 keys spanning over 7 octaves, the piano has the widest range of any standard acoustic instrument. It serves as the foundation for music theory education and is central to genres from classical and jazz to pop and film scoring.

Our virtual piano recreates the playing experience using the Web Audio API with oscillator synthesis and envelope shaping. No plugins, no installation — just open your browser and play piano online instantly.

Anatomy of a Piano

Strings

Steel strings of varying length and thickness vibrate when struck by hammers, producing the piano's characteristic tone.

Keyboard

88 keys (52 white, 36 black) spanning 7+ octaves from A0 to C8.

Hammer Action

Felt-covered hammers strike the strings when keys are pressed, then fall back to allow the string to vibrate freely.

Pedals

Three pedals control sustain (right), soft/una corda (left), and sostenuto (middle) for expressive dynamics.

Perfect For

How musicians use this virtual piano

From curious beginners to traveling musicians, our piano onlinetool fits every scenario where a real instrument isn't available.

Beginners

Learn piano basics, practice scales, and build finger coordination without investing in an instrument first.

Songwriters

Sketch out melodies and chord progressions on the go — anywhere you have a browser.

Music Theory

Visualize intervals, chords, and scales on a real keyboard layout. Great for ear training exercises.

Just for Fun

Play your favorite melodies, experiment with sounds, or just unwind with some casual piano playing.

Why Virtual Piano

Virtual piano vs. acoustic piano

Acoustic Piano

Costs $3,000 – $100,000+ for a quality instrument
Weighs 200–500 kg — not portable at all
Requires professional tuning 1–2 times per year
Needs dedicated room space

Virtual Piano

Completely free, forever
Play anywhere with a browser
Always perfectly in tune
Zero storage space needed
61

Keys

5

Octaves

0ms

Load Time

$0

Cost

FAQ

Virtual piano — frequently asked questions

Can I play piano online for free?

Yes. Our virtual piano runs entirely in your browser using the Web Audio API. Open the page and your computer keyboard maps to piano keys instantly. No downloads, no sign-ups — you can play piano online completely free.

Does the virtual piano work on mobile devices?

Yes, the virtual piano works on tablets and smartphones. On touch devices, tap the on-screen keys to play notes. For the best experience with full keyboard mapping to play piano online, we recommend a desktop or laptop.

How realistic is the virtual piano sound?

Our virtual piano uses Web Audio API oscillator synthesis with harmonics and envelope shaping to produce a warm, piano-like tone. While it differs from sampled grand pianos, it provides a pleasant and responsive experience — ideal for anyone looking to play piano online for practice or casual playing.

What keys on my keyboard map to the piano?

The number row (1–0) maps to C2–E3. The letter rows Q–P, A–L, and Z–M continue through F3–A4, B4–C6, and D6–C7 respectively — covering 5 full octaves and 61 keys. Hold Shift + any key to play its sharp (♯) note.

What browsers support the virtual piano?

Our virtual piano works in all modern browsers including Chrome, Firefox, Safari, and Edge. It uses the Web Audio API, which is supported by all major browsers released in the last several years.

Is there a sustain pedal feature?

Yes. The virtual piano includes a sustain toggle that lets notes ring out after you release the keys, simulating a real piano sustain pedal. Toggle it on and off using the control below the keyboard.

About

About this virtual piano

This free virtual piano is part of the Web Harmonium project. While our main instrument is the harmonium, we built this piano to give musicians another free tool for practice and exploration.

The audio engine uses Web Audio API oscillator synthesis — combining triangle and sine waves with lowpass filtering and ADSR envelope shaping to produce a warm, responsive piano tone. No audio samples to download means instant playback with zero latency.

Inspired by open-source projects like AutoPiano, this virtual piano focuses on simplicity — letting you play piano online with zero friction.

The piano keys are black and white, but they sound like a million colors in your mind.

— Maria Cristina Mena

Ready to play virtual piano?

Scroll back up and start playing piano online. No download, no signup — just your keyboard and instant sound.