
On this page 13 sections
You might find an .m3u8 file in a download folder, in the network tab of your browser’s developer tools, or as a link someone sent you with the words “just open this in VLC”. It looks like a video link, but double-click it and nothing much happens, or a text editor opens full of lines starting with #EXT. So what is it?
An M3U8 file is a playlist, not a video. It is the backbone of HLS streaming, the format behind most online video. This guide explains what is inside an M3U8, how to open and play one, and why some M3U8 links refuse to work.
M3U8 in plain terms
M3U started life in the 1990s as a simple playlist format for MP3 players like Winamp. It was a text file listing song files, one per line. M3U8 is the same format encoded in UTF-8, which is where the “8” comes from.
When Apple created HTTP Live Streaming (HLS) in 2009, it reused this format and added tags for streaming. Today, when people say “M3U8”, they almost always mean an HLS playlist.
The key idea: an HLS video is split into many small segments, each a few seconds long. The M3U8 playlist lists those segments in order, along with information the player needs, such as how long each segment is and whether it is encrypted.
The two kinds of M3U8
Master playlist (multivariant playlist)
The master playlist does not list segments. It lists versions of the same video at different qualities:
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
1080p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.2"
720p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1200000,RESOLUTION=854x480,CODECS="avc1.64001e,mp4a.40.2"
480p.m3u8
The player reads this, looks at your connection speed and screen, and picks one. If your connection changes, it switches to another. That is adaptive bitrate streaming.
Media playlist
Each quality level has a media playlist that lists the actual segments:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:6.0,
segment000.ts
#EXTINF:6.0,
segment001.ts
#EXTINF:5.2,
segment002.ts
#EXT-X-ENDLIST
If the playlist ends with #EXT-X-ENDLIST, it is a complete on-demand video. If not, it is probably a live stream, and the player will reload it every few seconds to find new segments.
Common M3U8 tags explained
| Tag | What it means |
|---|---|
#EXTM3U |
Must be the first line. Identifies the file as an extended M3U playlist |
#EXT-X-VERSION |
HLS protocol version the playlist uses |
#EXT-X-STREAM-INF |
Describes one quality level in a master playlist (bandwidth, resolution, codecs) |
#EXT-X-MEDIA |
An alternative track, such as another audio language or subtitles |
#EXT-X-TARGETDURATION |
The maximum segment length in seconds |
#EXTINF |
The duration of the next segment |
#EXT-X-MEDIA-SEQUENCE |
The number of the first segment in the playlist, important for live streams |
#EXT-X-KEY |
Segments are encrypted; gives the method and where to get the key |
#EXT-X-MAP |
Points to an initialisation segment, used with fMP4/CMAF segments |
#EXT-X-DISCONTINUITY |
A break in timing or encoding, common around ads |
#EXT-X-PROGRAM-DATE-TIME |
Real-world clock time of a segment, used for live streams and DVR |
#EXT-X-ENDLIST |
No more segments will be added |
Rather than decoding tags by hand, paste a playlist into our M3U8 analyzer. It lists the renditions, counts segments, checks durations and explains any encryption.
How to open and play an M3U8 file
Because an M3U8 is a playlist, “opening” it really means playing the stream it points to. Here are the easiest ways, for streams you are allowed to watch.
In a web browser
- Safari (Mac, iPhone, iPad) plays M3U8 links natively. Paste the URL into the address bar.
- Chrome, Edge and Firefox use JavaScript players to play HLS. The quickest way is our free online HLS player: paste the M3U8 URL and press Play. It also lists every quality level and shows errors.
In VLC Media Player
- Open VLC.
- Choose Media → Open Network Stream (or File → Open Network on Mac).
- Paste the M3U8 URL.
- Press Play.
If you have a local .m3u8 file whose segment paths are relative, keep it in the same folder as the segments, then open it with Media → Open File.
On a phone
On iPhone, Safari plays M3U8 links directly. On Android, VLC for Android and many other players can open network streams.
In a smart TV or IPTV app
Many IPTV players accept M3U or M3U8 playlists. Only use playlists from services you subscribe to. Unofficial IPTV lists that rebroadcast paid channels are illegal in most countries and are a common source of malware.
Why an M3U8 link won’t play
If a stream refuses to play, the cause is usually one of these:
- The link expired. Many services use signed URLs that work for minutes or hours. Copying a link from your browser and opening it later often fails with a 403 error.
- CORS restrictions. Web players on another website are blocked unless the stream’s server allows cross-origin requests. VLC is not affected by CORS, so a link that fails in a browser tool may still work in VLC.
- Mixed content. An
http://stream cannot be loaded by a page served overhttps://. - Login or cookies required. The playlist or segments need your session. Opening the link elsewhere does not carry your login.
- DRM protection. If the playlist includes
#EXT-X-KEYwith a FairPlay or Widevine key format, only the official app or website can play it. This is by design. See AES-128 vs DRM. - Unsupported codec. HEVC or AV1 streams will not play on devices that lack decoders. Check with our codec support checker.
- Broken playlist. Segments longer than the target duration, missing
#EXTM3U, or wrong relative paths all cause failures. The analyzer flags these.
Our guide HLS stream not playing: fixes covers each error in more depth.
How to create your own M3U8
If you want to stream your own videos with HLS, you do not write M3U8 files by hand. Tools generate them when they cut your video into segments:
ffmpeg -i lesson.mp4 -c:v libx264 -crf 21 -g 48 -sc_threshold 0 -c:a aac -b:a 128k \
-hls_time 6 -hls_playlist_type vod lesson/index.m3u8
This produces index.m3u8 and a series of .ts segments in the lesson folder. Upload the folder to a web server or CDN, and the M3U8 URL is your stream. For multiple quality levels, encode several renditions and create a master playlist, or use a packager such as Shaka Packager or a video platform that does it for you. Our encoding settings guide has a full bitrate ladder.
Remember to set CORS headers on your server if the player is hosted on a different domain, and use HTTPS.
Is an M3U8 file safe?
The file itself is plain text and cannot run code. The risk is in where it points. A playlist from a trusted service is fine. Playlists shared on forums or messaging apps promising free premium channels may point to pirated content, and the websites and apps that distribute them often carry malware and aggressive ads. Treat them with caution.
M3U8 vs MP4
An MP4 is a single file containing the whole video. An M3U8 is a list pointing to many small pieces. MP4 is simpler for downloads and short clips. M3U8/HLS is better for streaming because the player can start quickly, switch quality mid-video and serve live content. Most streaming services use HLS or DASH for playback and keep MP4 files only as masters.
M3U8 files in IPTV, radio and music players
HLS is the most common use of M3U8 today, but not the only one:
- Internet radio and music playlists. Many desktop media players save playlists as
.m3uor.m3u8. These are plain lists of audio files or stream URLs, without HLS tags. - IPTV channel lists. IPTV apps load an M3U8 file where each entry is a channel with a name, logo and stream URL, marked with
#EXTINFlines carrying attributes liketvg-nameandgroup-title. Legitimate IPTV providers supply these to subscribers. - Smart TV and set-top box apps often accept M3U8 URLs for channel line-ups from operators.
If you open an M3U8 in a text editor and see lines like #EXT-X-STREAM-INF or #EXT-X-TARGETDURATION, it is an HLS playlist. If you see a list of channel names with tvg- attributes, it is an IPTV list. If you see only file paths, it is a simple media playlist.
Editing an M3U8 safely
Because M3U8 is plain text, you can edit it with any text editor, which is handy for testing:
- Remove a rendition from a master playlist to test how players behave without it.
- Change a relative path to an absolute URL to see whether paths are the problem.
- Shorten a media playlist to create a quick test clip.
Save the file as UTF-8 without a byte-order mark, keep #EXTM3U on the first line, and use Unix line endings where possible. Some players reject files with odd encodings or a BOM.
A real-world M3U8, line by line
Here is a trimmed media playlist from a live stream, with what each line tells you:
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:18231
#EXT-X-PROGRAM-DATE-TIME:2026-09-20T18:04:12.000Z
#EXTINF:4.000,
seg18231.m4s
#EXTINF:4.000,
seg18232.m4s
The version line says the playlist uses features from HLS version 6. The target duration promises no segment will be longer than four seconds. The media sequence number, 18231, tells you this live stream has been running for a while: about 20 hours at four seconds per segment. The program date-time ties the first segment to a real clock time, which players use for DVR scrubbing and to measure latency. There is no #EXT-X-ENDLIST, so it is live and the player will fetch it again in a few seconds.
Reading playlists like this becomes second nature after a few tries. The M3U8 analyzer does the same reading for you and points out anything unusual.
Quick recap
Text file, not a video. It lists segments or quality levels. Play it with a player that understands HLS, and if it refuses, check the link, the login and the protection first.
Summary
An M3U8 file is a UTF-8 text playlist used by HLS streaming. Master playlists list quality levels, and media playlists list the segments that make up each level. You can play one in Safari, VLC or an online HLS player, and inspect it with an M3U8 analyzer. If it will not play, check for expired links, CORS, login requirements, DRM and codec support before assuming the file is broken.
Frequently asked questions
Is an M3U8 file a video?
No. It is a small text playlist. It points to the actual video segments, which are stored as separate files. Opening an M3U8 on its own without network access to those segments will not play anything.
How do I convert M3U8 to MP4?
For streams you own or have rights to, FFmpeg can read the playlist and copy the segments into one MP4 without re-encoding, using a command like ffmpeg -i playlist.m3u8 -c copy output.mp4. Protected or DRM streams cannot and should not be converted.
Can VLC play M3U8 links?
Yes. In VLC choose Media, Open Network Stream, paste the M3U8 URL and press Play. VLC handles most unprotected HLS streams.
What is the difference between M3U and M3U8?
M3U8 is an M3U playlist encoded in UTF-8. The 8 stands for UTF-8. HLS uses the M3U8 variant so playlists can contain any characters.


