Play Virtual Xylophone Online
Play a free online xylophone . Select either wooden or metal sounds. Tap the colourful bars to play notes, pick a built-in
song, or type your own melody and hear it play back.
Choose 8 or 15 bars, toggle reverb, and watch the mallets strike in real time.
Works on mobile and desktop — no download needed.
💻 Keyboard: A S D F G H J K — left to right
Screen Recording
Record your performance and download it as a WebM video.
Ready to record screen.
🎵 Song Presets
🎹 Compose Your Own
How to Play the Notes
The xylophone uses the C major scale — the same notes as the white keys on a piano. Each bar is labelled with its note name and its solfège name below it. Here is the full 8-bar layout:
| Bar | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Note | C4 | D4 | E4 | F4 | G4 | A4 | B4 | C5 |
| Solfège | Do | Re | Mi | Fa | Sol | La | Si | Do |
| Keyboard key | A | S | D | F | G | H | J | K |
Simple songs to start with
These three songs use only 3–5 notes, making them perfect for beginners. The numbers below refer to bar positions (1 = leftmost bar).
Hot Cross Buns — 3 notes only
Notes: Mi Re Do — Mi Re Do — Do Do Do Do Re Re Re Re Mi Re Do
Bars: 3 2 1 — 3 2 1 — 1 1 1 1 2 2 2 2 3 2 1
Mary Had a Little Lamb — 4 notes
Notes: Mi Re Do Re Mi Mi Mi — Re Re Re — Sol Sol Sol — Mi Re Do Re Mi Mi Mi Mi Re Re Mi Re Do
Bars: 3 2 1 2 3 3 3 — 2 2 2 — 5 5 5 — 3 2 1 2 3 3 3 3 2 2 3 2 1
Twinkle Twinkle Little Star — 6 notes
Notes: Do Do Sol Sol La La Sol — Fa Fa Mi Mi Re Re Do
Bars: 1 1 5 5 6 6 5 — 4 4 3 3 2 2 1
💡 Use the Song Presets above to hear any of these played automatically, then try following along bar by bar.
✅ How to Use
- Tap any bar to play it. On desktop, use the keyboard keys shown on each bar.
- Switch between 8 bars (one octave, beginner) and 15 bars (two octaves, full range).
- Pick a song from Song Presets and press Play or Loop to hear it.
- Use Compose Your Own — click the note buttons or type note names, set your tempo, and play it back.
- Toggle Reverb for a warm room sound, or turn it off for a dry, crisp tone.
About the Xylophone
The xylophone is one of the most recognisable percussion instruments in the world. Its name comes from the Greek words xylon (wood) and phone (sound) — literally "wooden sound." The instrument consists of a row of wooden bars, each cut to a precise length and tuned to a specific pitch. When struck with a mallet, each bar vibrates at its resonant frequency, producing a sharp, bright tone with a quick decay that is immediately distinct from softer-sounding instruments like the marimba.
Xylophones appear in traditions across almost every continent. In West Africa, instruments like the balafon have been played for centuries in ceremonies and communal gatherings. In Indonesia, the gambang features in gamelan ensembles. In Western classical music, the xylophone gained popularity in the 19th century — most famously in Saint-Saëns's Danse Macabre, where it mimics the rattling of dancing skeletons. Today it is a staple of school music education worldwide.
This virtual xylophone covers the C major diatonic scale — the white keys only — making it immediately accessible without worrying about accidentals. The 8-bar mode covers C4 to C5 (one octave), while 15-bar mode extends to two full octaves up to B5.
How a Xylophone Works
Each wooden bar on a xylophone is carefully shaped and sized so that it vibrates at one specific pitch when struck. Longer, wider bars vibrate more slowly and produce lower notes; shorter, narrower bars vibrate faster and produce higher ones. On a professional instrument, a hollow metal tube — called a resonator — hangs beneath each bar. When the bar vibrates, the resonator amplifies that frequency, making the note louder and giving it a slightly longer ring.
The bars are suspended over a frame on thin cord or rubber padding rather than resting directly on wood. This allows them to vibrate freely — any contact with a hard surface deadens the tone instantly. The layout follows the same pattern as a piano keyboard, with the lowest note on the left rising to the highest on the right.
Holding the Mallets
A xylophone is played with one mallet in each hand. The standard grip is simple: rest the mallet handle across your palm and pinch it lightly between your thumb and the side of your index finger, with your remaining fingers curled loosely underneath. Your wrists do most of the work — think of a relaxed, bouncing motion rather than a stiff downward push.
The key is not to grip tightly. A loose hold lets the mallet rebound naturally off the bar, producing a clean, resonant note. Pressing down or holding the mallet against the bar after striking will choke the sound immediately.
Where to Strike
Always aim for the centre of the bar. This is where the bar vibrates most freely and produces the fullest tone. Striking near the ends — where the bar is held by the frame — produces a duller, thinner sound. For fast passages, alternate between left and right mallets, letting each one bounce before the other lands.
Starting Out
Beginners often start by learning to play the C major scale from left to right, one note at a time, before trying simple songs. A good first target is keeping both mallets alternating evenly — left, right, left, right — while staying relaxed. Songs like Mary Had a Little Lamb and Hot Cross Buns only use three notes each, making them ideal for getting comfortable with position and timing before expanding to a wider range.
Frequently Asked Questions
What is a xylophone?
A xylophone is a tuned percussion instrument made from wooden bars arranged by pitch from low to high. When you strike a bar with a mallet, it vibrates and produces a musical note. Shorter bars create higher notes, while longer bars produce deeper tones.
What songs can I play on this virtual xylophone?
You can play beginner melodies such as Twinkle Twinkle Little Star, Happy Birthday, Ode to Joy, Jingle Bells, and Hot Cross Buns using the built-in presets. The custom composer also lets you enter your own note sequences to create original tunes.
What is the difference between 8-bar and 15-bar mode?
The 8-bar layout gives you a simple one-octave setup that is great for learning basic melodies. The 15-bar version expands the playable range to two octaves, making it easier to perform longer songs and more advanced note patterns.
How do I use the note composer?
You can enter note names directly into the composer or click the note buttons to build a melody visually.
The player supports standard notes like
C D E
as well as solfège names such as
Do Re Mi.
You can adjust tempo, insert pauses, and loop your melody for practice.
What do the solfège names on the bars mean?
The labels Do, Re, Mi, Fa, Sol, La, and Si are part of the solfège system used in music education. They correspond to the notes C, D, E, F, G, A, and B, helping beginners learn pitch relationships and sing melodies more easily.
Can I use a computer keyboard?
Yes. Each xylophone bar is mapped to a keyboard key so you can play without using a mouse. In 8-bar mode the keys run from A through K, while 15-bar mode adds additional keys for the extended octave range.
How do I hold a real xylophone mallet?
A relaxed grip works best. Hold the mallet lightly between your thumb and index finger while supporting it with your remaining fingers. Let the mallet rebound naturally after striking the centre of the bar to produce a cleaner sound.
Does it work on mobile?
Yes — the virtual xylophone is designed for phones and tablets as well as desktop devices. If you use 15-bar mode on a smaller screen, landscape orientation usually gives a more comfortable playing experience.
How is this different from the Virtual Marimba?
Although both instruments use bars arranged by pitch, the xylophone produces a brighter and sharper tone with a shorter sustain. The marimba has a warmer, deeper resonance and a softer overall sound character.
Bar Reference — C Major Scale
| Bar | Note | Solfège (C=Do) | Octave | Key (8-bar) |
|---|---|---|---|---|
| 1 | C | Do | 4 | A |
| 2 | D | Re | 4 | S |
| 3 | E | Mi | 4 | D |
| 4 | F | Fa | 4 | F |
| 5 | G | Sol | 4 | G |
| 6 | A | La | 4 | H |
| 7 | B | Ti | 4 | J |
| 8 | C | Do | 5 | K |
References & Notes
- Standard C major diatonic scale (no sharps or flats) — same as most beginner xylophones
- Solfège mapping: C = Do (relative, not fixed pitch)
- Bar proportions mirror real xylophone geometry — wider/taller for lower notes
- Song presets use hand-authored note timing at 80–100 BPM
This is a simulation tool for learning and entertainment.
Related Instruments
- Air Xylophone — play with hand gestures
- Virtual Marimba — warm rosewood sound with resonator tubes
- Virtual Kalimba
- Virtual Tabla
- Virtual Guitar
- Piano
- Pitch Detector
- Drum Machine
- Virtual Bass Guitar
- Virtual Organ