What is the M3U8 file format?
Files with the .m3u8 extension are UTF-8 encoded multimedia playlists. These are standard text files - they do not contain any real audio or video data, but only references to multimedia files or subfolders which store them. Besides the references they also include information about the playlist through comment lines beginning with #. Every extended playlist must start with the header tag #EXTM3U on its first line.
References to multimedia contained within .m3u8 files can occur in three forms: as a relative path, an absolute path, or a URL address.
HLS streaming. Today .m3u8 files are most widely used as HTTP Live Streaming (HLS) manifests - a technology introduced by Apple in 2009 and later standardized as RFC 8216. In this role the file describes where to fetch short .ts video segments (typically 2-10 seconds each) and, in a master playlist, which quality variants are available. HLS-specific directives use the #EXT-X- prefix - for example #EXT-X-STREAM-INF declares a variant bitrate, and #EXT-X-ENDLIST signals that a stream is complete.
.m3u8 files may be commonly encountered in streaming services, IPTV players, and Internet radio stations. They are also used to store playlists including multilingual names of songs, due to the UTF-8 symbol encoding standard ensuring that non-ASCII characters display correctly.
.m3u8 and .m3u are formats very similar to each other - they are playlist files recognised by multiple multimedia players. The only thing that differs them is the encoding guarantee: .m3u8 is explicitly UTF-8, while .m3u files may use any 8-bit encoding depending on the system locale, which can cause titles with accented or non-Latin characters to display incorrectly.
Security & safety
RISK: LOWThe .m3u8 file itself is harmless plain text. Two practical cautions: (1) it can point at remote URLs, so a malicious playlist could direct a player to unwanted content - inspect unfamiliar playlists in a text editor first. (2) Saving streamed video via m3u8 may breach a site's terms or copyright; only download streams you're entitled to. Avoid sketchy "m3u8 downloader" websites that push ads/PUP - use yt-dlp or ffmpeg directly.
Format details
in a nutshellPrograms that open M3U8 files
Technical details
deep spec| File type | Plain UTF-8 text; human-readable and editable in any text editor without special software |
| MIME types | `application/vnd.apple.mpegurl` (HLS); `audio/x-mpegurl` (legacy local playlist) |
| Magic header | `#EXTM3U` must appear on the very first line of every extended `.m3u8` playlist |
| Character encoding | Strictly UTF-8; the `8` in the extension explicitly signals this, enabling non-ASCII track titles and file paths |
| Reference types | Relative file paths, absolute file paths, and full HTTP/HTTPS/RTSP URLs |
| HLS segment format | MPEG-2 Transport Stream (`.ts`) or fragmented MP4 (`.fmp4`) files fetched sequentially by the player |
| HLS directive prefix | `#EXT-X-` tags control stream behavior - e.g. `#EXT-X-TARGETDURATION`, `#EXT-X-STREAM-INF`, `#EXT-X-ENDLIST` |
| Segment duration | Typically 2-10 seconds per segment, declared by `#EXTINF` per entry and bounded by `#EXT-X-TARGETDURATION` |
| Adaptive bitrate | A master `.m3u8` lists child playlists at different bitrates and resolutions via `#EXT-X-STREAM-INF` |
| Encryption | AES-128 per-segment encryption declared with `#EXT-X-KEY`; supports URI-based key server delivery |
| DRM integration | Compatible with Apple FairPlay, Google Widevine, and Microsoft PlayReady via `#EXT-X-SESSION-KEY` |
| Live vs. VOD | Live streams omit `#EXT-X-ENDLIST`; completed VOD playlists terminate with it so the player knows the stream has ended |
| Subtitle and caption tracks | WebVTT or TTML tracks referenced via `#EXT-X-MEDIA TYPE=SUBTITLES` or `TYPE=CLOSED-CAPTIONS` |
| Comment syntax | Any line beginning with `#` that is not a recognized tag is treated as a comment; used for metadata such as artist and title |
| Released | M3U from Winamp (late 1990s); m3u8 = UTF-8 M3U; HLS use of m3u8 since 2009 (Apple), RFC 8216 in 2017 |
| Open standard | Yes · royalty-free |
| Specification | datatracker.ietf.org |