Online Virtual Piano Keyboard
Play piano with mouse or keyboard, switch tones, record and playback
Zero Dependencies · Works OfflineWhat Can the Virtual Piano Do?
The online virtual piano keyboard is a free browser-based instrument powered by Web Audio API. Play instantly without installing any software. Supports both mouse clicks and keyboard shortcuts, multiple tones, and recording/playback.
Core Features
- Keyboard Play: Use your computer keyboard — white keys = A-;, black keys = W E T Y U O P
- Mouse Play: Click piano keys to play, supports slide playing
- Multiple Tones: Piano, Organ, Synth, and Strings
- Volume Control: Adjust volume with slider
- Octave Switch: Three octaves from C3 to B5
- Record & Playback: Record your performance and play it back
How to Use
- Select your preferred tone (Piano/Organ/Synth/Strings)
- Play by clicking keys or using keyboard shortcuts
- Keyboard mapping: White keys = A S D F G H J K L ; Black keys = W E T Y U O P
- Adjust volume with the slider
- Switch octaves for different pitch ranges
- Click Record to save your performance, then Playback
Use Cases
Music Learning
Beginners can practice scales and simple pieces on the virtual piano, familiarizing themselves with keyboard layout and intervals as a foundation for learning real piano.
Improvisation
Music creators can quickly try out melody fragments to capture inspiration. The recording feature lets you save your improvisations.
Classroom Demonstration
Music teachers can use the virtual piano to demonstrate intervals, chords, and scales without carrying a physical instrument.
Extended Knowledge
The virtual piano uses Web Audio API, a native browser audio interface. Tones are generated through OscillatorNode with different waveforms (sine, square, sawtooth, triangle) and shaped using GainNode for ADSR envelopes. Piano tone uses multi-harmonic overlay, strings use vibrato, and synth uses filters. Compared to MIDI pianos, Web Audio is lighter with no sample loading, though slightly less realistic than sampled instruments.