MusicXML: The Complete Guide to Digital Sheet Music Format
Sheet music has existed for centuries, but digitizing it in a way that preserves every nuance of musical notation — articulations, dynamics, ornaments, lyrics, chord symbols, tablature — while remaining transferable between different notation software has been a hard problem. MusicXML, developed by Recordare and first published in 2004, solved it. Today MusicXML is the universal interchange format for digital sheet music, supported by virtually every major notation application and many DAWs.
What Is MusicXML?
MusicXML is an XML-based open standard for representing Western music notation. Unlike audio formats (MP3, WAV, FLAC) that encode the sound of music, or MIDI that encodes the notes and timing as events, MusicXML encodes the visual and structural representation of music as it appears on a printed score:
- Notes: pitch, duration, accidentals, stem direction, beam groupings
- Rests: whole, half, quarter, eighth rests and smaller
- Measures and barlines: repeat signs, double barlines, final barlines
- Clefs and key signatures: treble, bass, alto clef; key changes throughout
- Time signatures: simple and compound meters, pickup measures
- Dynamics: pp, mp, mf, ff, crescendo/decrescendo hairpins
- Articulations: staccato, accent, tenuto, fermata, trill, mordent
- Tempo markings: BPM, metronome markings, rallentando/accelerando
- Lyrics: text under notes, multiple verses, elision and extension
- Chord symbols: lead sheet chord names (Cmaj7, Dm7, G7)
- Tablature: guitar TAB numbers in addition to staff notation
- Parts and instruments: full orchestral scores with dozens of staves
MusicXML vs MIDI: A Critical Distinction
The confusion between MusicXML and MIDI is common and important to resolve:
| Feature | MusicXML | MIDI |
|---|---|---|
| Represents | Sheet music notation | Performance events |
| Note duration | Notated duration (whole, half, quarter) | Clock ticks (timing) |
| Dynamics | Notated pp/ff markings | MIDI velocity (0-127) |
| Lyrics | Yes | No |
| Chord symbols | Yes | No |
| Tablature | Yes | No |
| Human readable | Yes (verbose XML) | No (binary) |
| Audio playback | Via notation software renderer | Direct MIDI playback |
| File size | Larger (XML) | Smaller (binary) |
| Use case | Score exchange between notation apps | Performance data, DAW sequencing |
When you want to move sheet music between Sibelius and Finale, use MusicXML. When you want to drive a synthesizer or import into a DAW sequencer, use MIDI.
File Structure
A MusicXML file can take two forms:
Uncompressed (.xml or .musicxml): a plain XML file, human-readable in any text editor.
Compressed (.mxl): a ZIP archive containing the MusicXML file plus referenced media files (images, audio). The .mxl extension is more common for distribution because of smaller file sizes.
A MusicXML file has this high-level structure:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 4.0 Partwise//EN"
"http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="4.0">
<work>
<work-title>Für Elise</work-title>
</work>
<identification>
<creator type="composer">Ludwig van Beethoven</creator>
<encoding>
<software>Sibelius 8</software>
<encoding-date>2025-04-25</encoding-date>
</encoding>
</identification>
<part-list>
<score-part id="P1">
<part-name>Piano</part-name>
</score-part>
</part-list>
<part id="P1">
<measure number="1">
<attributes>
<divisions>4</divisions>
<key><fifths>0</fifths></key>
<time><beats>3</beats><beat-type>8</beat-type></time>
<clef><sign>G</sign><line>2</line></clef>
</attributes>
<note>
<pitch><step>E</step><alter>-1</alter><octave>5</octave></pitch>
<duration>1</duration>
<type>eighth</type>
</note>
...
</measure>
</part>
</score-partwise>
Software Support
MusicXML is the most universally supported notation interchange format:
Professional Notation Software (Full Import/Export)
- Sibelius (Avid): MusicXML import and export, excellent fidelity
- Finale (MakeMusic): full support, handles complex scores
- Dorico (Steinberg): excellent MusicXML import, high-quality output
- MuseScore (free, open-source): the best free notation software, outstanding MusicXML support; also exports to PDF, MIDI, MP3
Online and Browser-Based
- Noteflight: web-based notation, imports/exports MusicXML
- Flat.io: collaborative web notation, MusicXML support
- musescore.com: community site for MuseScore files, hosts millions of MusicXML-based scores
DAWs (Partial Support)
- Logic Pro X: imports MusicXML via Score editor
- Cubase/Nuendo: MusicXML import for the Score editor
- Notion (PreSonus): full MusicXML support, notation-first DAW
Conversion and Processing
- music21 (Python library): the most powerful tool for algorithmic MusicXML processing — analysis, generation, transformation
- LilyPond: can import MusicXML via the
musicxml2lyconverter; outputs publication-quality engraved notation (PDF) - Verovio: JavaScript/C++ MusicXML renderer, renders MusicXML to SVG in the browser
Converting MusicXML
MusicXML → PDF
Every notation application can open MusicXML and export PDF. MuseScore (free) is the best free option: File → Open MusicXML → File → Export as PDF.
MusicXML → MIDI
Open in MuseScore or any notation software → Export as MIDI. The conversion maps notated dynamics to MIDI velocity and notated durations to MIDI timing.
MusicXML → LilyPond
musicxml2ly input.xml -o output.ly
Then compile: lilypond output.ly → produces publication-quality PDF.
MIDI → MusicXML
This direction is harder because MIDI contains performance data, not notation. Notation software attempts to "quantize" the timing and infer note values, but the result often needs manual cleanup. MuseScore does a reasonable job: File → Import MIDI.
Scanning Sheet Music → MusicXML (OMR)
Optical Music Recognition (OMR) converts scanned sheet music images to MusicXML:
- PhotoScore (paid): the most accurate commercial OMR tool, outputs MusicXML
- Audiveris (free, open-source): Java-based OMR with MusicXML output
- PlayScore 2 (iOS/Android): mobile app that scans and plays printed sheet music
MusicXML Versions
MusicXML 1.0 (2004): initial release, Recordare
MusicXML 2.0 (2007): added support for percussion, figured bass, tablature
MusicXML 3.0 (2011): better support for chord symbols, percussion, time signatures, multiple endings; transferred to W3C Music Notation Community Group
MusicXML 3.1 (2017): improved documentation, minor bug fixes
MusicXML 4.0 (2021): adds SMuFL (Standard Music Font Layout) support, improved percussion, better metadata, MIDI 2.0 properties
MusicXML and music21
The Python library music21 by MIT is the primary academic tool for computational musicology and uses MusicXML as its primary file format:
from music21 import corpus, converter
# Load a MusicXML file
score = converter.parse('beethoven_fur_elise.xml')
# Analyze key
print(score.analyze('key'))
# Transpose up a major third
transposed = score.transpose('M3')
transposed.write('musicxml', 'transposed.xml')
music21 can parse, analyze, generate, and transform MusicXML programmatically — useful for music theory research, algorithmic composition, and music education software.
MusicXML transformed the notation software landscape the way PDF transformed document publishing — by creating a reliable interchange layer that lets musicians move their work between applications without starting from scratch. For anyone working with digital sheet music, MusicXML fluency is as essential as MIDI knowledge.
Related conversions
Audio format pairs that come up most often: