Setup & Troubleshooting

M3U playlists explained: what an IPTV M3U file is, how to read it, and how to fix one that will not load

By Henry Hopkins · Reviewed by IPTV Americans Editorial Team · Published · · 22 min read

TL;DR

An M3U playlist is a plain-text file that lists your channels and the address of each stream. Each channel is two lines: an #EXTINF line with its name, logo, group and guide ID, then the stream URL. Your IPTV provider usually gives you one as a link, and any IPTV player — or VLC — can open it. It is the simplest way to load a channel list, and the most limited.

Annotated M3U playlist showing the #EXTM3U header, an #EXTINF line with the live-channel value, tvg-id guide ID, group-title folder and channel name, and the stream URL on the line below
Every channel is a pair: a line that describes it, and the address that plays it.

What is an M3U playlist?

An M3U playlist is a plain-text file listing media and where to find it. In IPTV, that means a list of channels: for each one, a name and a few details, followed by the web address the player should open to play it. There is nothing more to the format than that. You can open an M3U file in any text editor and read it.

The format is far older than IPTV. It began as a way to list music files, and it survived because it is so simple: a player reads the file from top to bottom and builds a channel list from what it finds. That same simplicity is why almost every IPTV player accepts one, and why an M3U playlist can also be the most frustrating way to load a subscription.

Three things an M3U playlist is not:

Our glossary entry for M3U gives the one-line definition. This page covers the file itself: what each line does, what the IPTV-specific attributes mean, how to load one, and how to diagnose one that will not.

Inside an M3U file, line by line

Here is a short IPTV playlist with three channels. Everything in a real playlist from a provider follows the same pattern — just repeated thousands of times:

#EXTM3U x-tvg-url="http://your-provider-host:8080/xmltv.php?username=USER&password=PASS"
#EXTINF:-1 tvg-id="espn.us" tvg-name="ESPN" tvg-logo="http://logos.example/espn.png" group-title="US Sports",ESPN
http://your-provider-host:8080/live/USER/PASS/10231.ts
#EXTINF:-1 tvg-id="cnn.us" tvg-name="CNN" tvg-logo="http://logos.example/cnn.png" group-title="US News",CNN
http://your-provider-host:8080/live/USER/PASS/10877.ts
#EXTINF:-1 tvg-id="bbcone.uk" tvg-name="BBC One" tvg-logo="http://logos.example/bbc1.png" group-title="UK Entertainment",BBC One
http://your-provider-host:8080/live/USER/PASS/20412.ts

Channel names, IDs and addresses here are illustrative. The structure is exact.

Line 1: the #EXTM3U header

The first line must be #EXTM3U. It tells the player this is an extended M3U — one whose entries carry information beyond a bare address. A player that finds anything else on the first line, including an error message or a web page, will usually refuse the file or show an empty list. That single fact is behind many "playlist failed to load" errors, and the self-test checks for it directly.

The header line can also carry settings for the whole playlist. The most useful is x-tvg-url, which points the player at a programme guide. More on that in the attributes section.

The #EXTINF line: everything about one channel

Every channel starts with an #EXTINF line. Read it in three parts:

  1. #EXTINF:-1 — the number after the colon is the item's length in seconds. For music it would be the track's duration. A live channel has no fixed length, so IPTV playlists use -1. You can ignore it; it is always there.
  2. The attributestvg-id="…", tvg-name="…", tvg-logo="…", group-title="…" and so on. These are what turn a list of addresses into a usable channel guide, with logos, folders and programme listings.
  3. The text after the last comma — the channel name as it should appear in your list. If a player shows a channel under a strange name, this is the part it is reading.

The URL line: where the stream lives

The line directly after each #EXTINF is the address of that channel's stream. On a typical IPTV service it contains the provider's server, your username, your password and a channel number, ending in a format such as .ts (an MPEG-TS stream) or .m3u8 (an HLS stream). The two lines always travel as a pair. Delete one without the other and every channel after it shifts out of step — a classic result of hand-editing a playlist.

Other lines you may see

Some playlists include extra lines starting with #, such as #EXTGRP for grouping, or #EXTVLCOPT and #KODIPROP, which pass settings to particular players. A player that does not recognise one simply skips it. Any other line starting with # is treated as a comment.

The IPTV attributes: tvg-id, group-title and the rest

The attributes inside #EXTINF are where IPTV playlists differ from the original music format, and where most of the confusion lives. The important thing to know first: there is no official standard for them. They are conventions that players and providers settled on over time. Nearly every IPTV player understands the common ones, but support for the rarer ones varies. The documentation for Kodi's IPTV Simple Client is one of the clearest public references, and the meanings below match it.

AttributeWhat it doesWhat breaks if it is wrong
tvg-idThe channel's ID, used to match it to the programme guideThe channel plays but its guide row is empty
tvg-nameThe channel's name as the guide knows it; some players use it as a fallback for matchingGuide matching fails on players that rely on names
tvg-logoThe address of the channel's logo imageA blank or generic logo
group-titleThe folder or category the channel appears in. Some players accept several groups separated by semicolonsChannels land in "Uncategorised" or one enormous list
tvg-chnoThe channel number to displayNumbering changes or duplicates
catchup, catchup-days, catchup-sourceWhether a channel offers replay, how many days back, and how to build the replay addressNo catch-up on that channel
tvg-shiftShifts that channel's guide times by a number of hoursListings an hour or more out; see the EPG time-zone section
radioMarks the entry as a radio station rather than TVRadio mixed into TV channels
x-tvg-url (header)The address of the programme guide for the whole playlist. Some playlists use url-tvg insteadNo guide unless you add one by hand

Why tvg-id matters more than the rest

If you learn one attribute, learn this one. Your player downloads the guide as a separate file, then connects each channel in the playlist to a row in the guide by comparing IDs. The tvg-id in the playlist has to match the channel ID in the guide exactly. espn.us and ESPN.us are not a match on a player that compares them strictly. When a handful of channels have no listings while the rest do, a mismatched tvg-id is almost always why. The full matching mechanism, including how to map channels by hand, is in our EPG guide's channel-matching section.

Why group-title decides whether the list is usable

A large subscription can list tens of thousands of entries. Without groups, that is one scrolling list nobody can navigate. With them, the player builds folders — US Sports, UK News, Movies — that you can open, hide or reorder. When a provider reorganises its groups, your hidden-group settings in the player can reset, because the player remembers groups by name. That is the likely reason channels you had hidden suddenly reappear.

M3U vs M3U8: what the 8 means

An M3U8 is an M3U saved with UTF-8 text encoding. The structure is identical. The 8 exists because a plain .m3u file may use whatever text encoding the computer that made it happened to use, while .m3u8 promises UTF-8. That difference matters the moment a playlist contains channel names in other languages or characters such as é, ñ or ü.

The symptom: garbled channel names

If channel names show up as é where an é should be, or as boxes and question marks, the player read the file with the wrong encoding. The channels themselves are fine. The fix is usually a player setting for playlist encoding, or asking your provider for a UTF-8 version. If you edited the file yourself, save it as UTF-8.

The confusion: an ".m3u8 link" is often not a channel list

There is a second, unrelated meaning worth separating out. Apple's HTTP Live Streaming (HLS) uses the M3U8 format for its own purposes: an HLS stream address ending in .m3u8 points to a tiny playlist of video segments for one stream, not a list of your channels. So when someone says "M3U8 link", they may mean a single HLS stream rather than a channel playlist. If you paste one into a player expecting a full channel list, you will get either one channel or an error. Our guide to how IPTV streaming works covers HLS in more depth.

An M3U URL vs an M3U file

You can give a player an M3U playlist in two ways, and they behave very differently over time.

Comparison of an M3U URL and a downloaded M3U file: the URL updates on refresh and fixes moved channels, while the file is a snapshot that goes stale and breaks when channels move
A link keeps up with your provider. A saved file starts ageing the day you download it.
M3U URL (a link)M3U file (downloaded)
What you give the playerA web addressA file saved on the device
When channels changePicked up at the next refreshNever — it is a snapshot
If a channel's address movesFixed automatically on refreshThat channel stops working until you download a new copy
Can you edit itNo, it comes from the providerYes, in any text editor
Best forEveryday viewingA deliberately trimmed, custom list

Use the URL unless you have a specific reason not to. A downloaded file starts going stale the day you save it: providers renumber channels, move streams and add new ones, and a file cannot follow. If channels that used to work in a saved playlist have gone quiet one by one over several weeks, that is the pattern of a stale file, not a failing service.

Where your M3U URL comes from

Your provider issues it, usually in the activation email or message alongside an Xtream Codes login. On services built on Xtream-style server software — which is most of them — the M3U link is generated from your account and follows a recognisable pattern:

http://your-provider-host:8080/get.php?username=USER&password=PASS&type=m3u_plus&output=ts

Knowing the parts lets you spot problems at a glance:

Because the same account produces both, an M3U link and an Xtream Codes login from one provider are two routes into the same subscription. Our Xtream Codes guide lists the related server addresses, including the one that serves the programme guide.

How to open an M3U playlist

Every IPTV player has an option labelled M3U, M3U URL or Playlist URL. The steps are close to identical everywhere: choose that option, paste the link, give the playlist a name, and wait for it to load. Where to find it in the most common players:

PlayerWhere the M3U option isGood for
TiviMateAdd playlistM3U playlist. Full walkthroughFire TV and Android TV, with a strong guide
IPTV Smarters ProLoad Your PlaylistM3U URL. Step by stepPhones, tablets, Apple TV and most TVs
VLCMediaOpen Network Stream, then paste the linkA quick test on a computer; not a TV guide
KodiThe PVR IPTV Simple Client add-on → M3U playlist locationPeople already using Kodi as their media centre

What to expect on the first load

M3U and the TV guide

A playlist never contains the programme listings. The player gets the guide one of two ways:

  1. From the playlist's header. If the #EXTM3U line includes x-tvg-url (or url-tvg), players that support it fetch the guide automatically.
  2. From an EPG URL you add yourself. If it does not, look in the player's settings for EPG or TV guide and paste the guide address from your provider. On Xtream-style services it usually ends in xmltv.php with your username and password attached.

Once both files are in, the player pairs them using each channel's tvg-id. That is why the most common M3U complaint — channels play, guide is blank — is a guide problem rather than a playlist problem. Our IPTV EPG guide explains the whole pipeline, and EPG not loading is the ordered fix list.

M3U or Xtream Codes?

If your provider gives you both, use the Xtream Codes login for everyday viewing, and keep the M3U link as a fallback. The short version of the trade-off:

The full side-by-side comparison, including when M3U is genuinely the better choice, is in our Xtream Codes vs M3U section.

M3U errors and what they actually mean

Start with one question: did the channel list load at all? A playlist that loads but will not play has a completely different cause from one that will not load. The table below is ordered that way.

What you seeWhat it usually meansWhat to do
"Playlist failed to load", "Parse error", or an empty listThe player did not receive a valid playlist — often an error page, an empty reply, or a login rejection instead of a file starting with #EXTM3URun the self-test; check the link was copied in full
An error mentioning 401, 403 or "forbidden"The server refused the request: expired account, wrong credentials in the link, or the link was regeneratedConfirm the account is active and get a fresh link from your provider
Loads on Wi-Fi, fails on mobile data or with a VPNThe provider's port is blocked on that networkTest once on another network or with the VPN off
Channels listed, but none will playThe playlist is fine; the streams, the format or the device is the problemTry a second device, then switch output=ts and output=m3u8
One channel fails, the rest playA source problem with that one streamReport the exact channel name to your provider
Channels that used to work stop, one by oneA saved M3U file gone staleUse the URL instead, or download a fresh copy
No logos, no folders, one long listA plain type=m3u playlist without IPTV attributesAsk for, or switch the link to, type=m3u_plus
Garbled characters in channel namesWrong text encodingSee M3U vs M3U8
Live TV only — no movies or seriesThe playlist carries live channels onlyUse the provider's Xtream Codes login for the on-demand library
Channels play, guide is blankA guide problem, not a playlist problemSee M3U and the TV guide
Slow to load, or the app crashes on a Fire TV StickA very large playlist exhausting a low-memory deviceHide unused groups, or switch to an Xtream Codes login, which loads in sections
Hidden channels reappeared, or favourites vanishedThe provider renamed its groups, or the playlist was deleted and re-addedRe-hide the groups; avoid deleting a playlist as a troubleshooting step

"Parse error" when the link looks right

This one is worth understanding, because the error message is misleading. The player asked the address for a playlist and got back something that was not one. When an account has expired, credentials are wrong or a server is having a bad moment, many servers reply with an empty response, an error code, or a short web page — and the player, seeing no #EXTM3U on the first line, calls it a parse error. The playlist format is rarely the real problem. The self-test shows you exactly what came back.

Why a huge playlist struggles on cheap devices

An M3U playlist has to be downloaded and read in one go, and every entry held in memory. On a subscription listing tens of thousands of channels and on-demand titles, that is a real load for a streaming stick. It shows up as a long first load, a sluggish guide, or the app closing itself. Hiding groups helps once the list has loaded. An Xtream Codes login helps more, because the player fetches the catalogue in pieces rather than all at once.

Test your M3U link yourself

You can check what your link actually returns in under a minute, which settles most "is it the player or the playlist?" questions. On a computer with a terminal, on the same network as your TV:

curl -s "http://your-provider-host:8080/get.php?username=USER&password=PASS&type=m3u_plus&output=ts" | head -5
Diagnostic diagram for an M3U playlist that will not load: a reply starting with #EXTM3U means the playlist is fine, an empty reply points to the account or link, an HTML page shows up as a parse error, and no connection means a wrong host, port or blocked network
“Parse error” rarely means the format is wrong. It means the server sent something that isn’t a playlist.

Then read what comes back:

To count how many channels the playlist contains, replace | head -5 with | grep -c "#EXTINF". Two cautions: the command stores your credentials in your terminal history, so do not run it on a shared or work computer, and never paste your link into an online "M3U checker" to test it — that hands your subscription to whoever runs the site.

Editing and trimming a playlist

Because an M3U is plain text, you can edit one. People do it to remove groups they never watch, reorder channels, or combine lists. It works, with some trade-offs worth knowing before you start.

For most people, the player does this better. Hiding groups and building favourites in TiviMate or Smarters Pro gives you the same trimmed list while keeping the live link, so nothing goes stale. Reach for a text editor only when you need a list the player cannot build.

Keeping your M3U playlist private

An M3U link from a paid service is a password. The username and password sit in plain text inside the address, and so does every channel URL within the file. Anyone who has the link can use your subscription, which quickly runs into your connection limit and can get the account suspended.

What "free M3U playlist" results actually are

Searches for M3U playlists turn up a steady supply of free lists. In practice they are collections of stream addresses assembled and posted by strangers. Most entries are dead within days, there is no guide behind them, nobody maintains them, and they regularly include streams nobody had the right to republish — sometimes alongside a working paid account's link that has been leaked. They can confirm that a player installed correctly. They are not a way to watch television.

Where M3U came from

The name is short for MP3 URL. The format dates from around 1996, and is often credited to Winamp — but according to Wikipedia's account, it was originally developed by Fraunhofer, the German research institute behind the MP3 format, for its WinPlay3 player. Music players adopted it widely, and an extended form added the #EXTM3U and #EXTINF lines that IPTV playlists rely on today.

M3U has never had a formal specification. It is a de facto standard, defined by what players accept rather than by any official document. That is why IPTV attributes such as tvg-id and group-title could be added by convention, and why support for them varies from player to player.

The closest thing to a formal definition came from Apple, which built HTTP Live Streaming on the extended, UTF-8 form of the format. That use was documented in 2017 as RFC 8216 — which covers HLS, not IPTV channel playlists, and is the reason .m3u8 now means two different things.

Sources

Quick reference: M3U terms in one place

TermWhat it is
M3UA plain-text playlist listing channels and their stream addresses.
M3U8An M3U saved as UTF-8. Also the format of HLS stream playlists.
#EXTM3UThe header. Must be the first line.
#EXTINFThe line describing one channel, followed by its stream URL.
-1The length value for a live channel with no fixed duration.
tvg-idThe channel ID matched against the programme guide.
tvg-nameThe channel name as the guide knows it.
tvg-logoThe channel logo's address.
group-titleThe folder or category a channel appears in.
catchup-daysHow many days of replay a channel offers.
x-tvg-url / url-tvgThe programme guide address, set in the header.
get.phpThe server address that generates an M3U from an Xtream-style account.
m3u_plusThe extended playlist type, with logos, groups and guide IDs.
output=ts / m3u8The stream format used in each channel address.

Frequently asked

What is an M3U playlist in IPTV?

An M3U playlist is a plain-text file listing your channels and the web address of each stream. Every channel takes two lines: an #EXTINF line with its name, logo, group and guide ID, then the stream URL. Your IPTV provider usually supplies it as a link, and any IPTV player, or a general media player such as VLC, can open it.

What is the difference between M3U and M3U8?

An M3U8 file is an M3U saved with UTF-8 text encoding; the structure is the same. The 8 matters when channel names contain accented or non-Latin characters, which can appear garbled in a file with the wrong encoding. Separately, an HLS stream address ending in .m3u8 usually points to a single stream rather than a list of channels.

Where do I get my M3U playlist URL?

From your IPTV provider, usually in the activation email or message. On most services it is generated from your account and looks like a server address followed by get.php with your username, your password, type=m3u_plus and an output format. The link contains your credentials, so treat it like a password.

How do I open an M3U playlist?

Choose the M3U or playlist URL option in your IPTV player, paste the link and give the playlist a name. In TiviMate it is Add playlist, then M3U playlist; in IPTV Smarters Pro it is Load Your Playlist, then M3U URL. On a computer, VLC opens one through Media, then Open Network Stream, which is useful as a quick test.

Is an M3U URL or an M3U file better?

Use the URL for everyday viewing. A URL is fetched fresh at each refresh, so channel changes and moved streams are picked up automatically. A downloaded M3U file is a snapshot that starts going stale immediately. A file only makes sense when you want a deliberately edited, custom list and accept that you will need to redo it.

Why will my M3U playlist not load?

Usually because the player did not receive a playlist at all. An expired account, wrong credentials in the link or a server problem often returns an empty reply or an error page instead of a file starting with #EXTM3U, which players report as a parse error or an empty list. Check the account is active, confirm the link was copied in full, and test it on another network.

Why does my M3U playlist have no TV guide?

Because the guide is a separate file. A playlist only points to it, through an x-tvg-url or url-tvg setting in its first line, or not at all. If the guide does not appear, add the EPG URL from your provider in the player's guide settings. If only some channels are missing listings, their tvg-id values do not match the guide.

Why are movies and series missing from my M3U playlist?

Many M3U playlists carry live channels only, depending on how the provider generates them. The on-demand library is usually delivered through an Xtream Codes login for the same account, which fetches live TV, movies and series separately. If your provider issued one, add the Xtream Codes login and the libraries should appear.

What does tvg-id mean in an M3U file?

tvg-id is the channel's identifier, used to match it to the programme guide. The player compares the tvg-id in the playlist with the channel IDs in the guide file, and they must match exactly. A channel with a missing or mismatched tvg-id still plays, but its row in the guide stays empty.

Can I edit an M3U playlist?

Yes. It is plain text, so any text editor works. Keep #EXTM3U as the first line, move each #EXTINF line together with the URL line beneath it, and save as UTF-8. An edited file stops updating when the provider changes channels, so for most people hiding groups and building favourites inside the player is the better way to trim a list.

Are free M3U playlists safe to use?

No. They are lists of stream addresses posted by strangers, and sometimes include leaked links to someone else's paid account. Most entries stop working within days, there is no guide behind them, nothing is maintained, and there is no way to know what servers you are connecting to or whether anyone had the right to share the streams.

Should I use M3U or Xtream Codes?

Use an Xtream Codes login when your provider offers one, and keep the M3U link as a fallback. Xtream Codes loads live TV, movies, series and the guide in sections and shows your account status. M3U is the better choice when a player only accepts playlists, or when you want a simple live-TV list in a general media player such as VLC.

A playlist that stays current.

M3U and Xtream Codes access with a full 7-day guide, from $29 USD. Published 7-day refund window, no contract.

About the author

Henry Hopkins writes about IPTV, streaming technology and cord-cutting for IPTV Americans. Every post is reviewed by the Streaming Engineering Review Board before publication. Read our methodology.