Online Tool Store Online Tool Store

Virtual Piano

Play a two-octave piano with sustain and volume control, record what you play, and download it as a WAV file — all in your browser, nothing uploaded.

This works right here on your device — nothing gets sent out.

Sample recording loaded — press Play.

Click keys with your mouse, or play using your computer keyboard (Z-M and Q-U, with S/D/G/H/J and 2/3/5/6/7 for the black keys). Turn on Sustain to let notes ring after you release a key.

How it works

  1. Click or tap a key, or use your computer keyboard, to play notes across two octaves (C4-B5).
  2. Turn on "Sustain" to let notes ring past the key release, and use the Volume slider to set how loud they play.
  3. Press "Record" before you play to capture the exact notes and timing of what you play.
  4. Press "Stop", then "Play recording" to hear your take played back automatically, or "Download WAV" to save it as an audio file.

How the sound is made

Each key triggers a Web Audio oscillator tuned to that note's frequency, calculated from standard 12-tone equal temperament relative to A4 = 440 Hz:

frequency = 440 × 2^((n − 69) / 12)

where n is the note's MIDI number (60 for middle C). A triangle wave with a fast attack and slow decay gives each note a plucked, piano-like envelope without needing to load a sampled audio file.

FAQ

Do I need a MIDI keyboard or any special hardware?

No — every note is synthesized in your browser using the Web Audio API. Play with your mouse/touch on the on-screen keys, or use your computer keyboard (Z-M and Q-U for white keys, plus the marked black-key shortcuts).

Why did nothing play the first time I clicked a key?

Browsers block audio until you've interacted with the page, so the very first click or key press both plays a note and unlocks sound for the rest of the session — after that, every key responds instantly.

How does recording work?

Press Record, then play notes as you normally would — each key press and release is timestamped. Press Stop, then Play recording to hear the exact notes and timing played back. Recording a new take replaces the previous one.

Can I save or export my recording as an audio file?

Yes — press "Download WAV" after recording to render your take to a standard .wav file and save it to your device. Recordings still live only in this browser tab until you download them, and are cleared on reload.

What does the Sustain button do?

It works like a piano's sustain pedal: while it's on, a note keeps ringing after you release its key instead of stopping immediately, until you turn Sustain off or press that note again.

Can I control how loud the notes are?

Yes — the Volume slider scales every note's level, for both live playing and anything you record or download afterward.

Is anything I play sent anywhere?

No. Every note is generated and played locally with the Web Audio API, and recordings stay in memory in your tab — nothing about what you play is uploaded or logged, including when you download a recording, which is rendered and saved entirely on your device.

Can I play more than two octaves?

Not currently — the keyboard is fixed at two octaves (C4-B5). A wider range isn't available yet.

How we compare

Feature Online Tool Store Musicca Piano OnlinePianist Virtual Piano
No sign-up or install ✓ ✓ ✓
Download your recording as a file ✓ (WAV) ✓ (MP3) Not listed among its features
Sustain pedal control ✓ Not listed among its features ✓ (on by default)
Adjustable volume ✓ ✓ Not listed among its features

If you just want to noodle on a keyboard, sketch a short melody, and walk away with an audio file — with a sustain pedal and volume control along the way — Virtual Piano gets you playing, recording, and downloading in seconds, right in this tab.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.