Online Piano
Just start playing: click or tap the keys, or use your computer keyboard (A = C, W = C♯ …). The sound is generated in your browser – no app, no sign-up.
How it is calculated
This online piano has five octaves (C2 to C7) and can be played with a mouse, your fingers or your computer keyboard – polyphonic, too. The sound is computed in your browser as you play; no piano recordings are loaded.
How to play
- Mouse or touch: click or tap the keys. Use several fingers for chords; sliding across the keys makes a glissando.
- Computer keyboard: the middle letter row plays the white keys (A = C, S = D, D = E, F = F, G = G, H = A, J = B, K = C …), the row above plays the black keys (W = C♯, E = D♯, T = F♯, Y = G♯, U = A♯). The mapping is shown on the keys.
- Change octave: with the arrow keys ← → or the octave menu.
- Sustain: hold the space bar or switch on the sustain button – released notes keep ringing, like with the right pedal.
- On a phone the keyboard is wider than the screen: page with ◀ ▶, swipe sideways in the grey strip below the keys or pick an octave.
Note names and octave numbers
Keys are labelled in scientific pitch notation: the letter names the note and the number the octave. C4 is middle C in the centre of the keyboard. Black keys are labelled with sharps (C♯, D♯, F♯, G♯, A♯); depending on the key signature the same keys are also called D♭, E♭, G♭, A♭ and B♭. Good to know: in German the note B is called H, and a German B means B♭.
How the notes are calculated
The piano uses equal temperament: every semitone is higher than the previous one by a factor of 21/12 ≈ 1.0595, and twelve semitones exactly double the frequency (an octave). The reference is concert pitch A4 = 440 Hz (ISO 16). So f = 440 Hz · 2(n − 69)/12 with the MIDI number n – for example, middle C4 = 261.63 Hz. The sound is built additively: overtones (whole-number multiples) of decreasing loudness are added to the fundamental, shaped by an envelope with a fast attack and slow decay, longer for low notes than for high ones.
Honest limits
- The sound is synthesised: it sounds like a piano, but not like a sampled concert grand. A computer keyboard cannot sense how hard you press, so all notes are equally loud.
- Many computer keyboards only detect a limited number of keys pressed at once (often 3 to 6). With large chords some notes drop out – that’s the hardware.
- Depending on device and browser there is a small delay between key press and sound; wired headphones usually have less than Bluetooth.
- It doesn’t replace a real instrument or lessons – but it’s great for trying things out, picking out melodies and learning note names.
Privacy
All notes are computed in your browser with the Web Audio API. Nothing is recorded, uploaded or stored.
A key doesn’t sound? Use the keyboard test to check whether your computer keyboard registers every key press.
Frequently asked questions
Can I play the piano online for free?
Yes. The online piano is free, with no sign-up and no app – it runs right in your browser on PC, laptop, tablet and phone.
How do I play piano with my computer keyboard?
The A key plays C, the middle letter row (A S D F G H J K L) plays the white keys and the row above (W E T Y U O P) the black keys. The arrow keys change the octave; the space bar sustains notes.
Can I play several notes at once?
Yes. With several fingers on touchscreens, or several keys on the computer keyboard. Some keyboards only detect 3 to 6 keys at the same time, though.
Where is middle C on the piano?
Middle C is C4, 261.63 Hz, in the centre of the keyboard. Here you play it with the A key when the octave is set to C4.
Does the online piano work on my phone?
Yes, in current browsers on Android and iPhone. The keyboard is wider than the screen – page with ◀ ▶, swipe in the grey strip below the keys or pick an octave. If the iPhone’s silent switch is on, it may stay quiet depending on the iOS version.
What does the sustain button do?
It works like the right pedal on a piano: notes keep ringing after you release them and fade out naturally. Hold the space bar or toggle the button.
How many keys does a real piano have?
A full piano has 88 keys (A0 to C8, 52 white and 36 black). This online piano shows 61 keys (C2 to C7), the range of a typical keyboard – enough for almost all melodies.
What tuning does the online piano use?
Equal temperament with concert pitch A4 = 440 Hz – like most modern pianos and keyboards.
Sources and legal basis
- ISO 16:1975 – Acoustics: Standard tuning frequency (standard musical pitch)
- MDN Web Docs – PeriodicWave (Web Audio API)
- Wikipedia – Piano key frequencies
As of:
Related tools
- White Noise & Rain SoundsFree white, pink and brown noise plus rain sounds with thunder, looping endlessly in your browser. Mix them freely, set a sleep timer with gentle fade-out.
- Mic test: check your microphoneFree online mic test: live level in dBFS, too quiet or clipping hints and a playback recording. Runs in your browser, nothing is uploaded.
- Keyboard test: do all your keys work?Free online keyboard tester: every key you press lights up and stays marked as tested. Shows key, code and location, plus a ghosting/rollover check.
- BMI calculator (WHO categories)Calculate your body mass index in lb and ft/in or kg and cm. See your WHO category, from underweight to obesity class III, and the healthy weight range.
- BMR and daily energy needs calculatorCalculate your basal metabolic rate with the Mifflin-St Jeor equation and your total daily energy needs with FAO/WHO activity levels (PAL), in kcal and kJ.
- Body Fat Calculator (U.S. Navy Method)Estimate your body fat percentage from height, neck, waist and hip measurements using the U.S. Navy equations by Hodgdon and Beckett (1984). In inches or cm.