Online Piano Keyboard is a free virtual piano with all 88 keys, from A0 at the bottom to C8 at the top: 52 white keys and 36 black keys, the same range as a full-size acoustic piano. It runs in your web browser with nothing to sign up for, download or install, and it works on computers, tablets and phones. Play it with a mouse, a touch screen, your computer keyboard or a MIDI keyboard.
Ways to play
Mouse and touch screen
Click a key to play it, or hold the button down and drag across the keys for a glissando, the quick sweep up or down the keyboard. On a touch screen, tap with several fingers at once to play chords. Slide the small Move keys map to travel through all 88 keys without playing, or use Lower and Higher to move an octave at a time. Middle C brings you back to C4, marked with a gold dot. Choose Play mode to keep the instrument in the screen while you play, with extra controls under Settings.
Computer keyboard
Two rows of your computer keyboard play the white keys, starting from C at Z and at Q, and the keys just above each row play the black keys, in the same pattern as a piano. Together they cover more than two octaves:
| Note | C | C# | D | D# | E | F | F# | G | G# | A | A# | B |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lower row | Z | S | X | D | C | V | G | B | H | N | J | M |
| Upper row | Q | 2 | W | 3 | E | R | 5 | T | 6 | Y | 7 | U |
Where a piano has no black key, between E and F and between B and C, the computer key in that spot is skipped. Past B, both rows run on into the next octave: the lower row with , L . ; and / (C up to E), and the upper row with I 9 O 0 P [ = and ] (C up to G). The left and right arrow keys move everything down or up an octave, and the space bar holds the sustain pedal. With a mouse, each key shows the computer key that plays it above its note name, so you can learn the layout as you play.
Letter sheets
Sheets written for virtual pianos spell a song as letters: Twinkle Twinkle Little Star starts t t o o p p o. To play them, choose Letter sheets under Computer keys in the keyboard settings. Then 1 to 0, followed by Q to M, play the white keys from C2 to C7, so middle C is t. A capital letter or a symbol means holding Shift with that key for the black key just above it: T is C#4 and ! is C#2. Song pages then show their computer keys in the same letters, and the choice stays in your browser.
You can also Tab onto a piano key. Left and Right choose neighboring notes; Home and End reach the ends of the displayed keyboard. Page Up and Page Down move an octave. Hold Enter or Space to play the focused note, then release it to stop. In this mode, Space plays the note; use the Sustain button for the pedal.
MIDI keyboard
A MIDI keyboard plugged into your computer plays the piano too, with velocity sensitivity and its sustain pedal, in Chrome, Edge, Opera and Firefox. Safari does not support MIDI keyboards in the browser, so on a Mac, use one of the others. If your browser asks for permission to use MIDI devices, allow it. Connect MIDI keyboard is in Keyboard settings; if the page finds no keyboard, plug it in and press a key, and it connects without pressing Connect again. Close other music apps that may be using the keyboard.
Sounds, sustain and volume
The main sound is a sampled grand piano: the Salamander Grand Piano, a Yamaha C5 recorded by Alexander Holm and released under the CC BY 3.0 license (see licenses). It has four velocity layers, so on a MIDI keyboard soft and hard playing sound different, not just quieter or louder. Two more sounds, an electric piano and an organ, are synthesized in your browser.
The sustain pedal keeps notes ringing after you let go of the keys, like the right pedal on an acoustic piano. Hold the space bar, use the on-screen pedal button, or press a MIDI sustain pedal. A volume control sets the overall level.
Key labels and middle C
You can label the keys with note names (C D E), note names plus the computer key that plays each one (the default with a mouse), solfège (Do Re Mi), computer keys alone, or nothing at all. Every C is the white key just left of a group of two black keys, and middle C (C4) is the fourth C from the left, near the center of the keyboard. The A above it, A4, is the standard tuning pitch of 440 Hz. For a full tour, read about the piano keys.
Record, download and share
Record what you play and play it back to hear how it sounds. From there you can:
- Download it as a MIDI file, which stores the notes you played rather than the sound, so music software can open it, edit it or play it with a different sound.
- Download the audio, in browsers that support recording audio.
- Copy a share link that plays your recording for anyone who opens it. The recording lives inside the link itself, so saving the link saves the recording.
The grand-piano samples load in the background. If a note is still loading, hold the key to hear it when ready, or release it and play it again. Playback waits for its samples; press Stop to cancel while they load. Switching away from the tab stops recording or playback.
The piano's sound sources and calculation methods explain the recordings, note naming and browser limits behind the instrument.
Playing on a phone or tablet
- Choose Play mode to keep the piano in the screen. It works in portrait or landscape; turning sideways gives you more keys across the screen.
- Slide the keyboard map to reach more notes, or use Lower and Higher. Middle C returns to the starting position. Tap Settings for labels, key size, the metronome and recording downloads. Exit returns to the page without discarding the take.
- Choose a key size that suits your fingers: bigger keys are easier to hit, smaller ones fit more of the keyboard on the screen.
- Use several fingers for chords, and slide one finger along the keys for a glissando.
- No sound? Turn up the volume and check that your phone is not set to silent.
First songs to try
A good first song uses only a few notes, moves mostly between neighboring keys and repeats its phrases, so your hand can stay in one place while you learn it. The song pages show each melody as sheet music with the letter name under every note, as plain letter notes and as computer keys, and have two modes: Listen plays the song and lights up the keys, and Practice lights up the next key and waits for you to press it. The same songs turn into a game in the falling notes game, where each note drops toward its key.
- Hot Cross Buns needs only three notes: E, D and C.
- Mary Had a Little Lamb adds just one more, G.
- Twinkle Twinkle Little Star uses the six white keys from C up to A.
- Ode to Joy, the theme from Beethoven's Ninth Symphony, moves almost entirely step by step.
Twinkle Twinkle, Ode to Joy and Silent Night also have two-hand beginner scores. Hear or practice the right hand, left hand or both, and print the aligned treble and bass staves.
If you are starting from scratch, learn the piano keys and hand position first, then play your first song one step at a time.
Chords and scales
The chord progression generator connects chords into a sequence you can edit, transpose, loop and download as MIDI.
The chord finder lights up and plays 15 chord types on any of the 12 roots, inversions included, and every major, minor and 7th chord has its own page, such as B minor or G7, with fingering and inversions. The scale finder shows and plays major, minor, pentatonic, blues and chromatic scales in every key.
Frequently asked questions
Is Online Piano Keyboard free?
Yes. It is free to use, with no signup, no download and nothing to install. Open the page and start playing.
Does it work on phones and iPads?
Yes. Tap the keys with one or several fingers. Choose Play mode for a dedicated playing screen, and slide the small keyboard map to reach more notes. Both orientations work; landscape fits more keys. MIDI keyboards are supported in computer browsers, so on an iPad you play by touch.
Does it work on a Chromebook?
Yes. A Chromebook runs it in Chrome like any other computer, so you can play with the touchpad, the touch screen if it has one, its keyboard, or a MIDI keyboard plugged into it.
Can I connect a MIDI keyboard?
Yes. Plug it into your computer and play in Chrome, Edge, Opera or Firefox; velocity and a sustain pedal both work. Safari does not support MIDI keyboards in the browser.
How many keys does it have?
All 88 keys of a full-size piano, from A0 to C8: 52 white keys and 36 black keys. The keyboard scrolls, and you can choose one of three key sizes.
How do I play chords on a computer keyboard?
Press the keys together. In the lower row, Z, C and B play C, E and G, a C major chord; V, N and the comma key play F major, and B, M and the period key play G major. Some computer keyboards cannot register every three-key combination, so if a note drops out, try the upper row, where Q, E and T play C major.
Can I play virtual piano letter sheets?
Yes. Choose Letter sheets under Computer keys in the keyboard settings. Then 1 to 0 and Q to M play the white keys from C2 to C7, middle C is t, and a capital letter or symbol such as T or ! means Shift with that key, the black key just above it.
Can I record what I play?
Yes. Record a take and listen back, then save it as a MIDI file or as audio where your browser supports recording audio, or send it to someone as a link.
Is anything I play uploaded?
No. A share link carries the recording inside the link itself, so nothing is uploaded or stored on a server. There are no accounts, so keep a recording by downloading it or saving its link.