Music TheoryPrintMusic theory tools and printable charts

Xylophone Online

Strike a bar to play.

Computer keys play the bars from low to high:

Learn a song

Choose a song and the next bar to strike lights up. Strike the lit bar to move on.

Play a xylophone online: 8 colored bars or a 25-note glockenspiel, played with mouse, touch or keyboard, plus a learn-a-song mode that lights the next bar.

About the Online Xylophone

The online xylophone on this page is a free virtual xylophone that runs in your web browser, with no sign-up. You can play it by clicking, tapping or sliding across the bars, or by pressing computer keys. It has two instruments: an 8-bar xylophone and a 25-note glockenspiel. All sound is synthesised live in the browser, so nothing is uploaded and no cookies are set by the tool. You can also learn songs one bar at a time: pick a tune and the next bar to strike lights up, so you can follow a melody without reading music. Bars are colored by note name and labeled with letters or Do Re Mi.

Xylophone online example

How to play the xylophone online

  1. Click, touch or press any key once on the page. Browsers keep sound off until you do this, so the first press may start the audio.
  2. Choose the 8-bar xylophone or the 25-note glockenspiel.
  3. Pick a bar label: Letters, Do Re Mi (solfege), or None.
  4. Click or tap a bar to play it. Slide your finger or the mouse across the bars to play a run.
  5. Press the keys A S D F G H J K to play the 8-bar xylophone from the lowest bar to the highest.
  6. Hover over a bar to see its note name and frequency. The line below the bars shows the last note you played and its frequency in Hz.
  7. Use the volume slider to adjust the loudness. Choose Start again whenever you want to restart a song from its first note.
  8. To learn a song, choose one from the list. The next bar to strike lights up with a white outline. Strike it to move on.

Hovering shows the note details, and the line below the bars keeps track of your last note. The tool does not record or export what you play, and it does not support MIDI.

What notes does a xylophone have?#

The 8-bar xylophone in this tool covers the notes of the C major scale, from C5 to C6: C, D, E, F, G, A, B, C. That is one octave, and the two C bars sit at each end. The 25-note glockenspiel covers every chromatic note from G5 to G7, including the sharps and flats in between.

Pitch in this tool follows equal temperament, with A4 set to 440 Hz. In that system, C5 is about 523.25 Hz and C6 is about 1046.5 Hz, because each octave doubles the frequency. Each bar’s length follows the same rule as a real instrument: the longest bar is the lowest note, and the bars get shorter as the notes get higher. Shorter bars vibrate faster, which produces a higher pitch.

How do you play a song on a xylophone?#

A xylophone plays one note at a time, so a melody is a list of bars to strike in order. Each bar is named by the letter of its note, so a tune such as C C G G A A G is read as a row of bar names. On a real instrument, players use two mallets and usually alternate hands, which keeps the rhythm even and lets each hand move to the next bar without a collision.

On this page you can practise the order of the bars first, without worrying about rhythm. Pick a song under Learn a song and strike each lit bar. When you know the route, play the song again from memory, then speed up. For printed letter notes of the same songs, use the Xylophone notes page.

What is the difference between a xylophone and a glockenspiel?#

The main difference is range and the notes they include. The xylophone here has eight bars that follow the white keys of a piano from C to C. The glockenspiel has 25 bars that include every semitone, so it can play the black-key notes too, shown as darker bars.

The sound differs as well. The glockenspiel rings longer and brighter than the xylophone, which has a shorter, woodier attack. Real instruments also differ in build: xylophones usually have wooden bars and glockenspiels usually have metal bars.

Frequently asked questions

Why are the bars different colours and lengths?

The bars use a rainbow colour scheme, so each natural note has its own colour: C is red, D orange, E yellow, F green, G turquoise, A blue and B purple. On the glockenspiel, the sharps and flats are dark bars with a stripe in the colour of the natural note below. Colours on real instruments vary by brand.

Can I play the online xylophone on a phone?

Yes. You can click or tap a bar, and you can slide a finger across the bars to play a run. The keyboard shortcuts only work when you have a physical keyboard connected.

Why can't I hear any sound when I click a bar?

Browsers keep sound off until you click, touch or press a key on the page. Make one press on the page first, and the sound should start. If it stays silent, check the volume slider.

What happens if I strike the wrong bar when learning a song?

The tool counts the wrong bar, and the same bar stays lit so you can try again. When the song ends, it shows how many wrong bars you struck. Choose “Start again” to play the song from the beginning.

Do I have to play a song in time?

No. The tool checks which bars you strike, not when you strike them. Rhythm and timing are not checked, so you can go as slowly as you like.

Does the tool upload or store anything I play?

No. The tool runs in your browser, nothing is uploaded, and it sets no cookies. All sound is made live in the browser, so no sound files are downloaded.

Updated