A complete example

#EXTM3U
#EXTINF:-1 group-title="News",Example News One
https://example.com/news-one.m3u8
#EXTINF:-1 group-title="Music",Example Music Two
music/track-two.mp3

The three kinds of line

Line starts withKindWhat a player does
#EXTM3UHeaderMarks the file as extended. Expected on line 1.
#EXTINFMetadataGives the duration and title for the next entry.
Anything elseEntryA path or URL to play. Relative paths resolve from the playlist's folder.

The header

#EXTM3U must be the first line for an extended playlist. A file without it can still work in many players, which is why this is a warning rather than a fatal error in most tools.

The metadata line

#EXTINF:-1 means the duration is unknown, which is normal for streams. The text after the comma is the display title. Attributes such as group-title="News" are optional and read differently by each player.

The entry

The line after a metadata line is the address to play. It can be a local path, a relative path or a web URL. Each entry is one line with nothing else on it.

Where the format comes from

M3U has no formal specification. It is a de facto standard, and the name is generally described as short for "MP3 URL". Sources do not agree on who created it. RFC 8216 credits the format to Nullsoft's Winamp player. Wikipedia says it was developed by Fraunhofer for its WinPlay3 software. Both agree the format is old, and that many players read it.

The #EXTM3U and #EXTINF tags come from the extended form. Apple used the extended M3U format, UTF-8 encoded, as the base for HTTP Live Streaming. That protocol was documented as RFC 8216 in August 2017, and it inherits both tags from M3U. So the header and metadata lines in this guide are the same tags a streaming manifest uses.

The .m3u and .m3u8 extensions differ by encoding. A file saved as .m3u8 is UTF-8 encoded. Wikipedia notes that this distinction has mostly been lost in practice, and many tools accept either extension.

  • RFC 8216: HTTP Live Streaming, IETF, August 2017. Sections 4.3.1.1 (EXTM3U) and its reference to M3U.
  • M3U, Wikipedia. Format description, origin, encoding and HLS history.

What to check

  • Every #EXTINF line should be followed by an entry line.
  • Entries should not be blank, and should not be the same line repeated.
  • Paths using backslashes or spaces should match the system that will open the file.

The M3U File Inspector lists each entry and reports lines that do not fit this structure. It checks the file's form only, not whether any address still works.