XSPF File Documentation
Summary
An .xspf file (pronounced “spiff”) is an XSPF playlist, the XML Shareable Playlist Format published by the Xiph.Org Foundation in 2006. It is a plain-text XML file that lists the locations of songs or videos to play in order, but contains no media itself. Open it in VLC to play the listed tracks, or in any text editor to edit the entries. It converts to other playlists such as M3U but cannot be turned into an MP3. Its MIME type is application/xspf+xml.
Technical details
| Feature | Value |
|---|---|
| Full name | XSPF — XML Shareable Playlist Format (“spiff”) |
| File extension | .xspf |
| MIME type | application/xspf+xml |
| Format type | Plain-text XML playlist (references only, no media) |
| Developer | Xiph.Org Foundation (XSPF working group) |
| Introduced | XSPF 1.0, 2006 |
| Open standard | Yes |
| Base format | XML 1.0, UTF-8 |
| XML namespace | http://xspf.org/ns/0/ |
| Root element | <playlist version="1"> |
| Track container | <trackList> holding <track><location> entries |
| First bytes | <?xml then <playlist (text, not a binary signature) |
| Contains media? | No — only file paths / URLs and metadata |
| Related extensions | .m3u, .m3u8, .pls, .wpl, .asx, .cue |
| Specification | xspf.org/spec |
What is an XSPF file?
An .xspf file is a playlist in the XML Shareable Playlist Format, pronounced “spiff”. It is an open standard from the Xiph.Org Foundation, with version 1.0 released in 2006, designed as a portable, vendor-neutral alternative to the older M3U and PLS playlists. Like every playlist format, it contains no media of its own: it is a list of locations — local file paths or web URLs — to be played in order, wrapped in well-formed XML so that the list, and the metadata attached to each track, can be validated and exchanged between applications.
The choice of XML is the whole point of the format, so the sections below work through it: the document skeleton and its namespace, the <trackList> and the anatomy of a <track>, how <location> URIs are resolved (and why that is where playlists “break”), the metadata XSPF can carry that a plain text playlist cannot, and why converting an XSPF to an audio file is a category error.
The document skeleton and the XSPF namespace
A valid XSPF file is a normal XML 1.0 document in UTF-8. It opens with the XML declaration and a single root <playlist> element that carries a version attribute and, importantly, the XSPF namespace:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<title>Road trip</title>
<creator>Alex</creator>
<trackList>
<track>
<location>file:///music/01%20-%20Intro.flac</location>
<title>Intro</title>
<creator>The Band</creator>
<album>First Album</album>
<duration>214000</duration>
</track>
<track>
<location>https://example.com/stream/2.mp3</location>
<title>Second Track</title>
</track>
</trackList>
</playlist>
The namespace http://xspf.org/ns/0/ is what identifies the document as XSPF to a parser rather than as arbitrary XML, and the version="1" attribute marks XSPF 1.0. Playlist-level metadata such as <title>, <creator>, <info>, <annotation> and <image> may appear before the track list and describe the playlist as a whole.
The trackList and the anatomy of a track
All the entries live inside a single <trackList> element, and their document order is the play order. Each entry is a <track> whose only truly meaningful child for playback is <location>: a URI pointing at the media. Everything else on a track is optional descriptive metadata, and this is where XSPF earns its keep over a bare text playlist:
| Element | Meaning |
|---|---|
<location> | URI of the media (file path or URL); a track may list more than one as fallbacks |
<title> | Track name |
<creator> | Artist / author |
<album> | Album name |
<trackNum> | Ordinal within its album |
<duration> | Length in milliseconds |
<image> | URI of cover art |
<info> | URI of a human-readable info page |
Because the metadata is structured XML rather than a comment convention, it survives round-trips between applications and stores Unicode/non-Latin track names cleanly, which line-based playlists historically struggled with.
How <location> URIs resolve, and why tracks go “missing”
The single most important thing to understand about any playlist, XSPF included, is that it stores references, not content. A <location> is a URI: file:///… for a local file (percent-encoded, so a space becomes %20) or http(s)://… for a network stream. When you open the .xspf, the player resolves each URI and fetches the media at play time. If a referenced file was moved, renamed, or is simply not present on this device, the player cannot find it and the track shows as missing or unplayable — even though the .xspf itself is intact. The fix is not to repair the playlist but to correct the <location> paths (it is plain text, so any editor works) or to rebuild the playlist where the files actually live. This is also why emailing someone an .xspf of your local library gives them a list of paths that mean nothing on their machine.
Why you cannot convert XSPF to MP3
A recurring request is to “convert” an .xspf to an MP4 or MP3. There is nothing to convert: the file holds only pointers and metadata, not a single audio sample, so there is no bitstream to encode. What people want is the songs the playlist references, which you get by playing the list in a player or by locating and fetching the files each <location> points to. What is a real conversion is changing the playlist format: because XSPF is open XML, it maps cleanly onto the ubiquitous M3U, its UTF-8 variant M3U8, PLS or Windows Media’s WPL. VLC can load an .xspf and “Save Playlist” as M3U; only the list of pointers is rewritten, and the underlying media is never touched. The paths must still resolve on the target device for the new playlist to play.
Which players read XSPF, and VLC’s role
XSPF never displaced M3U as the everyday default, so in practice you meet an .xspf mainly because VLC saved one — VLC uses XSPF as a native “Save Playlist” format — or because an open-source player or a website exported one. VLC is the most reliable reader across desktop and mobile; Audacious and foobar2000 also support it. Simpler players and many hardware devices prefer M3U, which is why converting an XSPF to M3U is the common practical step to get a stubborn device to play the list.
FAQ
How do you pronounce XSPF?
“Spiff.” It stands for XML Shareable Playlist Format, an open standard from the Xiph.Org Foundation.
Why won’t the songs in my XSPF play?
An XSPF only points to files; it does not contain them. If the referenced songs were moved, renamed, or are not on this device, the player cannot find them. Open the .xspf in a text editor, check the <location> URIs, and fix the paths or rebuild the playlist where the files are.
What is the difference between XSPF and M3U?
Both list only track locations. XSPF is open XML with structured, validated metadata (title, creator, album, duration, cover art) and clean Unicode support; M3U is a simpler line-based text list that far more players and devices understand. Converting XSPF to M3U keeps the track list but flattens the rich metadata.
References
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.