Online Tool Store Online Tool Store

Virtual Piano

Play a two-octave piano with your mouse or keyboard, then record and play back what you played. Runs entirely in your browser — nothing is uploaded.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

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).

How it works

  1. Click or tap a key, or use your computer keyboard, to play notes across two octaves (C4-B5).
  2. Press "Record" before you play to capture the exact notes and timing of what you play.
  3. Press "Stop", then "Play recording" to hear your take played back automatically.

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?

Not yet — recordings live only in this browser tab and are cleared on reload. Exporting to WAV/MP3 is a possible future addition, not built today.

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.

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 Typical ad-supported online pianos Dedicated DAW software
No sign-up or install
Built-in record and playback ✗ (usually paid)
No ads or pop-ups on the page
Free, no premium tier Varies — many gate features behind sign-up

If you just want to noodle on a keyboard or sketch a short melody without installing anything, Virtual Piano gets you playing — and recording — 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.