Virtual Piano — Play Online Free
Play a full virtual piano in your browser — no download, no login. Use your computer keyboard or mouse/touch. Choose from 6 instrument voices, record your session and download it, and see live chord detection as you play. Furthermore, the scale highlighter shows which keys belong to any major or minor scale.
How to Play the Virtual Piano
Playing the virtual piano is instant — no downloads, no account, no plugins. Click any key with your mouse, tap on mobile, or use your computer keyboard. Furthermore, the keyboard layout maps the home row keys to the white keys of one full octave, giving you a natural and familiar feel.
Computer Keyboard Mapping
| Keys | White Keys (Notes) | Black Keys (Notes) |
|---|---|---|
| Home row — A S D F G H J K L ; | C D E F G A B C D E (octave 3+) | — |
| Top row — W E T Y U O P | — | C# D# F# G# A# C# D# |
| Z / X | Shift octave down / up | |
| Space bar | Sustain pedal (hold while playing) | |
Mouse and Touch
Click any key to play it. On a phone or tablet, tap the keys — multi-touch is supported so you can play chords. Moreover, the keyboard scrolls horizontally if you select a larger octave range.
Recording Your Piano Session
Click ⏺ Record to capture your session as audio. Play whatever you like, then click ⏹ Stop. Furthermore, you can immediately play it back or download it as a WebM audio file, which opens in any modern browser and most media players. Moreover, your recording stays in your browser — nothing is uploaded to any server.
Recording uses the Web Audio API's MediaStream destination — it captures the synthesised audio directly, so the recording quality matches exactly what you hear.
The 6 Instrument Voices
Each voice uses a different oscillator waveform and ADSR envelope to mimic the attack, sustain, and decay of a real instrument. Furthermore, the piano and bell voices include a second harmonic oscillator to add warmth and overtone richness.
| Voice | Character | Best For |
|---|---|---|
| 🎹 Piano | Bright attack, natural decay | Classical, pop, general use |
| 🎻 Organ | Sustained square wave | Church music, rock, jazz |
| 🎸 Guitar | Sharp pluck, quick decay | Strumming patterns, melody |
| 🪈 Flute | Smooth sine, slow attack | Melodic lines, folk |
| 🎛 Synth | Bright sawtooth, sustained | Electronic, leads, pads |
| 🔔 Bell | Fast attack, long ring | Glockenspiel, arpeggios |
Chord Detection Explained
The chord detector analyses all keys held at once and identifies the matching chord name. Furthermore, it checks all 12 possible root notes and matches against 13 chord types including major, minor, dominant 7th, diminished, augmented, suspended, and power chords. Moreover, the root note shown is the most likely root — for inverted chords the detection still shows the chord name even if the bass note differs.
The scale highlighter colours keys that belong to the selected scale in green, helping you stay in key while improvising. Additionally, it works in real time as you change the scale dropdown — no need to rebuild anything.
FAQ
Browsers require a user interaction before starting audio — this is the Web Audio autoplay policy. Click anywhere on the page first, then press a key. Furthermore, if you use the keyboard shortcuts, clicking a key with the mouse first will unlock audio for keyboard input too.
Recording requires the MediaRecorder API which is supported in Chrome, Edge, Firefox, and Safari 14+. Furthermore, the download saves as a WebM file — convert it to MP3 using any free audio converter if needed. Moreover, nothing leaves your device during recording.
Yes — hold multiple keyboard keys simultaneously. Furthermore, most keyboards support 6-key rollover or more, so playing 3 or 4 note chords works well. For full 88-key range use Z and X to shift octaves and combine keys across two octaves.
Click the ⛶ button in the top-right of the piano. Furthermore, full screen gives you more keyboard space and hides the browser UI. Press Escape or click ✕ to exit. Moreover, all controls remain accessible in full screen mode.
Completely free — no sign-up, no subscription, no ads in the tool. Furthermore, all audio synthesis happens in your browser using the Web Audio API, so no sounds are streamed from a server. Moreover, you can bookmark the page and use it offline if your browser has cached it.
Related Music Tools
Metronome
Keep perfect time while practising. Furthermore, set BPM and time signature for any genre.
Guitar Tuner
Tune any instrument by ear using reference tones. Moreover, chromatic and standard modes.
BPM Detector
Tap to find the tempo of any song. Furthermore, useful for matching beats and arrangements.
Frequency Generator
Generate pure tones at any Hz. Furthermore, useful for tuning, testing, and ear training.
Audio Key Finder
Upload audio and detect the musical key. Moreover, works on MP3, WAV, and OGG files.
Note Frequency Chart
Full piano note-to-Hz reference from A0 to C8. Furthermore, includes MIDI numbers too.