Online Virtual Piano — Play Piano Online With Your Keyboard

~/online-virtual-piano 🖐️ hands 🎼 chords 🎮 8bit 🥁 drums 📖 chart ☕ Support me apps ← about me
Play, record and learn piano with your computer keyboard — 20 instruments incl. a real sampled grand, 73 keys, real dynamics, MP4 export, no install. 🎹
Drop the .mid file to load it as a song
Type Z X C V B N M and Q W E R T Y U  ·  ← / → octave  ·  Shift = sustain  ·  [ ] transpose  ·  K metronome

A piano you play by typing

Online Virtual Piano turns your computer keyboard into a playable instrument. Two rows of keys are mapped to 2.4 octaves — enough to play real melodies without constantly shifting position. The default Real Grand plays recordings of a real concert grand; the other instruments are synthesised live in your browser.

There are 20 instruments, grouped like the sound menu of a keyboard. Real Grand is a sampled Yamaha C5 concert grand with three velocity layers, and twelve more are recorded too: Rhodes Electric Piano, FM Electric Piano, Drawbar Organ, Accordion, String Ensemble, Choir Pad, Warm Synth Pad, Clavinet, Marimba, Concert Harp, Brass Section and a Saw Synth Lead. Sustaining sounds such as organ, strings and pads hold for as long as you keep a key down. The seven modelled voices — Concert Grand, Soft Felt, Bright Upright, Honky-Tonk, Electric Piano, Music Box and Harpsichord — are synthesised live and switch instantly. All of them are loudness-matched, so changing instrument changes the character without a jump in level.

On the modelled voices the tone is computed rather than recorded. Strike harder and the note gets brighter, not just louder, because more upper partials are excited — the single most important thing that makes a piano sound like a piano. Partials are stretched slightly sharp to imitate string inharmonicity, upper partials fade before the fundamental, each note carries a short hammer thump, and bass strings ring for many seconds while the top notes die away quickly.

sampled grand20 instruments73 keysMP4 video exportorgan & strings2.4 octavesvelocity dynamicsconvolution reverblearn modeMIDI exportMIDI file playermetronometransposescale highlightingUSB MIDI inno install

How to play

Z X C V B N MWhite notes, lower octave S D  G H JBlack notes, lower octave Q W E R T Y U I O PWhite notes, upper octave 2 3  5 6 7  9 0Black notes, upper octave ← / →Octave down / up Shift / SpaceHold for sustain pedal - / =Softer / harder touch (the keys right of 0) [ / ]Transpose down / up a semitone KMetronome on / off LCycle key labels: both · notes · keys · off EscExit fullscreen
FAQ & about the virtual piano

FAQ — Online Virtual Piano

Playing it
How do I play the piano with my keyboard?

Press the letter keys. Two rows are mapped: the bottom row (Z X C V B N M) plays the lower octave with S D G H J as its black keys, and the QWERTY row (Q W E R T Y U I O P) plays the octave above with 2 3 5 6 7 9 0 as its black keys. You can also click with the mouse or tap on a touchscreen.

How many octaves can I play at once?

About 2.4 octaves — 29 semitones — across the two key rows. That is wide enough for most melodies and simple two-hand arrangements without touching the octave shift. The older version of this page mapped only 1.5 octaves, which meant constantly jumping octaves mid-phrase. The on-screen keyboard shows 73 keys (E1 to E7, the range of a 73-key stage piano); the cyan strip marks the part your computer keys reach, and the rest can be played with the mouse, touch or a MIDI keyboard. On phones only the typeable range is shown, so the keys stay big enough to tap.

I have an AZERTY or QWERTZ keyboard — will the keys still line up?

Yes, and there is nothing to configure. The piano listens to the physical position of each key rather than the character it produces, so the note under your finger is identical on every layout. The layout selector only changes the letters drawn on the on-screen keys so they match your keycaps — including the accented characters AZERTY puts on the number row.

Can the keys show Do Ré Mi instead of C D E?

Yes. Under Keyboard, set Note names to Do Ré Mi and the keys and octave display switch to fixed-do solfège (Do Ré Mi Fa Sol La Si), as taught in French-, Italian-, Spanish- and Portuguese-speaking schools. If your browser language is one of those it is picked for you on your first visit; your choice is remembered after that.

How do I change octave?

Use the Octave − / + buttons or the ← / → arrow keys. The range your keyboard currently controls is marked with a cyan strip along the top of those keys, so you can always see where your hands sit on the instrument.

Is there a sustain pedal?

Yes. Hold Shift or the Space bar while playing, or switch on Sustain in the panel to latch it. Notes keep ringing and a little extra resonance is added, mirroring the way lifting the dampers on a real piano lets other strings vibrate in sympathy.

Can I play louder or softer from the computer keyboard?

A computer key has no pressure sensor, so notes default to a medium-firm velocity. Use the Touch slider, or tap - and = (the two keys to the right of 0) while you play, to go softer and darker or harder and brighter — enough to shape a phrase. Ctrl, Alt and Cmd are deliberately ignored, so a browser shortcut like Ctrl+W can never fire in the middle of a piece. For continuous control, connect a MIDI keyboard.

Some keys do not sound when I press several at once.

That is your keyboard, not the page. Most membrane keyboards can only report a few simultaneous keypresses per region — a hardware limitation called ghosting or limited key rollover. Mechanical keyboards with N-key rollover do not have this problem, and neither does a connected MIDI keyboard.

What do the falling colours on screen mean?

When you play freely they are just a visualisation: each note throws up a coloured column above its key, tinted by pitch and sized by how hard you played. In learn mode the same lanes are reused to show notes descending towards the key you need to press next.

Does it work on a phone or tablet?

Yes. Tap the on-screen keys, and slide your finger across them to glissando. Fullscreen in landscape gives the most usable key width. There is no computer keyboard on a phone so the typing shortcuts do not apply, but touch, learn mode and recording all work normally.

The sound
What instruments can I choose from?

Twenty, grouped like the sound menu on a keyboard. Pianos: Real Grand (a recorded Yamaha C5 with three velocity layers), Concert Grand, Soft Felt, Bright Upright and Honky-Tonk. Electric pianos: Rhodes, FM Electric Piano and a modelled Electric Piano. Organs & accordion: Drawbar Organ and Accordion. Strings, choir & pads: String Ensemble, Choir Pad and Warm Synth Pad. Keys, mallets & harp: Clavinet, Marimba, Concert Harp, Music Box and Harpsichord. Synth & brass: Brass Section and Saw Synth Lead. Recorded instruments load once, about 1 MB each, the first time you pick them.

Why does the Honky-Tonk sound out of tune?

Because it is, deliberately. A honky-tonk piano has its twin strings pulled about 15 cents apart, so each note plays two slightly different pitches at once. They drift in and out of phase, producing the shimmering beat that gives saloon and ragtime piano its character. This voice runs two detuned oscillator banks per partial to reproduce it.

Why is the Harpsichord the same volume however hard I play?

That is historically correct, not a bug. A harpsichord plucks its strings with a quill, and a pluck releases the same energy no matter how firmly you press — which is precisely why the piano was invented, and why its original name was gravicembalo col piano e forte, "harpsichord with soft and loud". This voice ignores velocity to match. Every other instrument here responds to touch.

Why does the Music Box sound bell-like rather than string-like?

Because struck metal bars do not vibrate in whole-number harmonics the way strings do. A free bar's modes sit at roughly 1 : 2.76 : 5.40 : 8.93 times the fundamental, which is why bells and glockenspiels sound glassy and slightly clangorous instead of warm. That voice uses those real ratios rather than a harmonic series.

Are the instruments matched in volume?

Yes, and not by ear. Each voice was rendered offline across five registers and its loudness measured, then trimmed to match the Concert Grand — that took a 17.9 dB spread down to about 1.2 dB, so switching instrument changes the tone without a jump in level. Headroom is set so even a hard four-note chord stays below full scale at maximum volume.

Why does the Room slider move when I change instrument?

Each instrument suggests a sensible amount of space — a felt piano wants more, a bright upright wants less, a music box wants a lot. The slider moves visibly so it is obvious what happened, and you can override it immediately afterwards; your choice stays until you switch instrument again.

Does it use recorded piano samples?

Yes, most of them. The default Real Grand plays recordings of a real Yamaha C5 concert grand from the free Salamander Grand Piano V3 library, sampled every three semitones at three velocities, so a soft note and a hard note are different recordings. Twelve more instruments — Rhodes, FM piano, organ, accordion, strings, choir, pads, clavinet, marimba, harp, brass and a synth lead — come from the free, MIT-licensed FluidR3 GM SoundFont, loudness-matched and, for sustaining sounds, looped seamlessly so held notes never run out. Each loads only when you pick it and is then cached by your browser. Seven further instruments are synthesised live with the Web Audio API.

Real Grand uses the Salamander Grand Piano V3 samples by Alexander Holm, licensed CC BY 3.0. Rhodes, FM piano, organ, accordion, strings, choir, pads, clavinet, marimba, harp, brass and synth lead use the FluidR3 GM SoundFont by Frank Wen (MIT licence).

Why do the highest notes keep ringing after I let go?

That is intentional, and it is what a real piano does. On an acoustic piano the top octave has no dampers — very short strings lose their energy quickly by themselves, so fitting dampers there is pointless. Those notes therefore continue sounding after you release the key. This piano copies that behaviour above roughly C6.

What is the difference between velocity and volume?

Volume is one control over how loud everything is. Velocity is how hard a single note is struck, and on a piano it changes tone as well as level: a hard strike excites more upper partials and sounds brighter and more percussive, a soft one is rounder and darker. Because this instrument models that relationship, a MIDI keyboard gives genuinely different timbre across the dynamic range rather than just a louder note.

Can I change how much reverb there is?

Yes, the Room slider. At zero you hear the raw instrument, which is useful for judging exactly what you are playing. Higher settings place the piano in a progressively larger, more reflective space. The reverb is a real convolution, generated in the browser from a synthetic impulse response, so it adds no download.

Why can I only hold a limited number of notes at once?

There is a 16-note polyphony limit. Each sounding note runs several oscillators, so without a cap a long pedalled passage would slowly saturate the audio thread and begin to crackle. When the limit is hit the oldest and quietest note is faded out first, which is normally inaudible.

Why is there no sound until I click or press a key?

Browsers block audio until you interact with the page, to stop sites making noise at you unprompted. The first click or keypress starts the engine. If you still hear nothing, check the tab is not muted and the volume slider is up.

There is a delay between pressing a key and hearing it.

Notes are generated the instant the key event arrives, so latency comes from your audio hardware and browser rather than this page. Closing other audio apps, using wired rather than Bluetooth headphones, and using Chrome usually give the lowest latency. Bluetooth alone adds 100–200 ms that nothing in a browser can remove.

Learning & recording
How does learn mode work?

Pick a song and the notes fall down the screen towards the keyboard, lighting up each key as it lands. Use the tempo slider to slow a tricky passage down. Turn on Wait for me and the song pauses on every note until you play it correctly, so you can work through a piece at your own pace instead of chasing the playback.

Which songs are included?

Ten melodies, all firmly in the public domain: Für Elise, Ode to Joy, Moonlight Sonata, Twinkle Twinkle Little Star, Happy Birthday, Jingle Bells, Silent Night, Amazing Grace, Greensleeves and Scarborough Fair. They are arranged as single-line melodies for learning, not as full concert arrangements.

Can I record what I play?

Yes. Press Record, play, then Stop. You can replay the take, download it as a real .mid file, or copy a share link that reproduces the performance for anyone who opens it. The sustain pedal is captured as well, and the share link also carries your instrument and Room setting, so it sounds the way you played it.

What exactly is in the exported MIDI file?

A standard format 0 MIDI file at 480 ticks per quarter note and 120 BPM, containing note-on and note-off events with the velocity you played, plus sustain-pedal (CC64) events. It opens in GarageBand, Logic, Ableton, FL Studio, Reaper or MuseScore. A MIDI file carries notes, not audio, so it will play back through whichever instrument your software assigns — it will not sound like this page unless you point it at a piano.

How long can a share link be?

The whole performance is packed into the link itself, so nothing is stored on a server — but browsers and chat apps limit URL length. Takes up to roughly 250 notes encode comfortably; beyond that you will be told to use the MIDI export instead, which has no limit.

Can I download my recording as a video or MP4?

Yes. After recording, press Download video (.mp4). The take is played back through the current instrument, room and sustain pedal, and saved as a 1280×720 video with the real sound: the 73-key keyboard lighting up and each note rising from its key. It records in real time, so keep the tab open and visible until it finishes. Chrome, Edge and Safari save MP4; Firefox saves WebM, which plays everywhere and uploads to YouTube, Instagram or WhatsApp just the same. For editing in a DAW, use Download .mid instead.

Can I use a real MIDI keyboard?

Yes. Plug in a USB MIDI keyboard, click Connect MIDI and allow access when asked. Notes arrive with true velocity, so dynamics and timbre respond as they would on hardware. Web MIDI is supported in Chrome, Edge and Opera; Safari and Firefox do not implement it, so use the computer keyboard there.

Can I use what I record commercially?

Yes — what you play is yours, with no watermark and no attribution required. One caveat worth stating plainly: that covers your performance. If you record a piece that is still under copyright, the underlying composition is a separate question from the recording you just made.

Practice tools
Can I open a MIDI file and play along?

Yes. Click Open MIDI or drop a .mid file on the piano. It loads as a song with falling notes. Under You play choose Listen only, All notes, Right hand, Left hand or a single track, and the piano plays everything else for you. With Wait for me on, the song pauses until you hit each of your notes, and the Tempo slider slows it down for practice. The file is read in your browser and never uploaded.

Is there a metronome with a count-in?

Yes. Switch on ♩ Metronome in the bar above the keys (or press K), set the tempo with − / +, type a BPM or use tap, and pick 2/4, 3/4, 4/4 or 6/8. Count-in clicks one bar before a song or a recording starts. If you record with the metronome on, the exported MIDI file uses the same tempo and time signature, so it lines up with the bar lines in a DAW.

How do I transpose the piano to another key?

Use Transpose − / + above the keys, or the [ and ] keys, to shift everything up to an octave either way in semitone steps. You keep playing the same keys, but they sound in the new key, which is handy for singing along or matching another instrument. Note names on the keys follow the sounding pitch, and recordings are saved at the transposed pitch.

Can the piano highlight the notes of a scale?

Yes. Pick a key and a scale under Scale (major, minor, harmonic minor, major or minor pentatonic, blues, dorian or mixolydian). Every note in the scale is tinted blue and the root is marked purple, so you can improvise without hitting a wrong note. It follows the transpose setting as well.

Privacy, offline & cost
Are my recordings uploaded anywhere?

No. Everything runs in your browser. Recordings stay in memory until you export them, settings are kept in your own browser's local storage, and no audio or performance data is ever sent to a server. There is no account and no tracking of what you play.

Are my settings remembered?

Yes — volume, reverb, touch, instrument, layout, note-name style (C D E or Do Ré Mi), octave, the label toggles and sustain are saved to your browser's local storage and restored next visit. Nothing leaves your device; clearing browser data resets everything to defaults.

Does it work offline?

Once the page and the Real Grand samples have loaded, yes — the samples stay in your browser cache and every other sound is generated locally, so you can keep playing with the connection off. Only the web font and the share-link feature touch the network.

How do I run it fullscreen?

Click the ⛶ fullscreen hint or the Enter Fullscreen button. Press Escape or the ✕ Exit button to leave. The keyboard stays fully playable in fullscreen, including on iPhone and iPad.

Is it free?

Completely free — no account, no ads, no watermark. It is one of the free browser-based tools at jasperbernaers.com. If it saved you some time, you can buy me a coffee, but it is never required.

Playing piano in a browser, and what that actually gets you

A virtual piano is not a replacement for a weighted instrument, and it is worth being honest about that up front: no browser page can reproduce the feel of a hammer action under your fingers. What it can do is remove every barrier between you and the notes. There is nothing to buy, install, tune or find space for, and a melody you want to try at one in the morning is about four seconds away.

A real sampled grand — and a modelled one

Most online pianos either use a handful of recorded samples or a very plain oscillator. Samples sound authentic but cost megabytes; a single velocity layer also means a soft note is just a quieter copy of a loud one. A plain oscillator loads instantly but sounds like a toy, mostly because it misses the single most characteristic thing about a piano: striking a key harder changes the tone, not just the level. Hit a real string hard and the hammer excites far more upper partials, giving that bright percussive edge; brush it gently and you get a round, dark, almost flute-like note.

This page does both properly. The default Real Grand uses the Salamander Grand Piano V3 recordings of a Yamaha C5 with three velocity layers, picked by how hard you play, loaded in the background while the modelled grand covers the first seconds. The modelled instruments take the other route — describe the instrument well enough that it behaves correctly while loading instantly. Alongside velocity-dependent brightness it reproduces string inharmonicity (real piano partials sit progressively sharp of exact harmonic multiples, which is precisely why pianos are tuned with stretched octaves), partial-dependent decay so the tone mellows as it rings, a short hammer noise at the attack, and a decay time that varies enormously across the instrument.

RegisterApproximate ring timeWhy
Bass (A0–C2)15–25 secondsLong, heavy strings hold energy for a very long time
Middle (C3–C5)5–10 secondsThe singing register most music sits in
Treble (C6–C8)1–3 secondsShort strings shed energy fast — which is why they need no dampers

Seven modelled instruments from one engine

Because the instrument is described by parameters rather than stored as audio, adding a voice costs nothing to download. Each preset changes the physics rather than applying an effect:

InstrumentWhat is actually different
12 recorded keyboard soundsRhodes, FM piano, organ, accordion, strings, choir, pads, clavinet, marimba, harp, brass, saw lead — FluidR3 GM, loudness-matched, sustaining sounds looped seamlessly
Real GrandRecorded Yamaha C5 (Salamander Grand Piano V3): 30 sample points × 3 velocity layers, chosen by touch
Concert GrandNine partials, long per-register decay, moderate string stiffness
Soft FeltSteep high-frequency rolloff, slow attack, exaggerated felt thump — the modern lo-fi ballad sound
Bright UprightMore partials, shorter strings so higher inharmonicity, fast clicky attack
Honky-TonkTwin oscillator banks 15 cents apart, producing genuine beating
Electric PianoTine bell partial at 6.4× that barks on hard notes, plus a 5.2 Hz tremolo
Music BoxInharmonic bar modes at 1 : 2.76 : 5.40 : 8.93 instead of a harmonic series
HarpsichordSawtooth pluck, bright quill transient, and no touch sensitivity at all

That last one is worth dwelling on. A harpsichord plucks rather than strikes, and a pluck imparts the same energy however hard you press the key — you cannot play it louder. That single limitation is why the piano exists: Cristofori's instrument was called gravicembalo col piano e forte, "harpsichord with soft and loud". Selecting the harpsichord here and hammering the keys demonstrates the problem he solved rather better than a paragraph does.

The detail almost every virtual piano gets wrong

On an acoustic piano the top octave or so has no dampers at all. Those strings decay so quickly on their own that fitting dampers would be pointless engineering. The audible consequence is that high notes keep ringing after you release the key, while middle and bass notes stop almost immediately. Nearly every browser piano silences every note identically on key-up. This one does not — release a note above C6 and it rings on, exactly as it would on a real instrument.

Learning a melody without reading notation

Falling-note guidance is how most people now learn a first tune, and it works because it removes two problems at once: you do not need to read staff notation, and you do not need to keep time with a recording that will not wait. Wait for me mode holds each note until you play it, so a difficult bar becomes a puzzle you solve rather than a race you lose. Slow the tempo down, get the fingering under your hands, then raise it. That is genuinely how practice works.

Everything included here is public domain, which matters more than it sounds — a lot of sites quietly serve copyrighted arrangements. Für Elise and Ode to Joy are excellent first pieces because their opening phrases sit inside a single hand position. Twinkle Twinkle and Happy Birthday are better still if you have never played at all.

Recording, and what a MIDI file really is

The recorder captures pitch, timing and velocity, then writes a genuine format 0 MIDI file. It is worth understanding what that gives you: a MIDI file contains no audio. It is a list of instructions — this note, this hard, at this moment — which is why the files are tiny and why they can be edited note by note afterwards in any DAW. Open your export in MuseScore and it becomes sheet music; open it in Logic and you can quantise it, change the instrument, or rewrite a wrong note without replaying anything.

If you have a USB MIDI keyboard, plugging it in bypasses the computer-keyboard limitations entirely: full polyphony with no ghosting, and real continuous velocity feeding the timbre model. Web MIDI is Chromium-only, so Chrome, Edge and Opera work while Safari and Firefox do not.

Privacy

Nothing you play leaves your device. Notes are generated locally, recordings live in memory until you choose to export them, and preferences are stored in your own browser. There is no account, no upload, and no analysis of your playing. Share links carry the performance inside the URL itself rather than on a server, which is also why very long takes have to go out as MIDI instead.