M3U Playlists Explained: Format, Tags and Common Errors
A clear guide to the M3U and M3U8 playlist format: #EXTM3U, #EXTINF, tvg-id, group-title, EPG links, catch-up tags, safe editing and common errors.
By the IPTV Commons teamUpdated 6 min read
On this page
- What does an M3U file look like?
- What do the attributes mean?
- What are the catch-up attributes?
- What is the difference between an M3U playlist and an HLS .m3u8 file?
- How do I edit an M3U file safely?
- What are the most common M3U errors?
- Where can I get help?
- How do I check that a playlist is well formed?
- Why do some playlists have thousands of lines?
- Can I use relative paths or local files?
- Frequently asked questions
An M3U playlist is a plain text file that lists media streams, one entry after another, so a player knows what to load and how to label it. It is the standard way IPTV player apps import a channel list, and it is easy to read once you know the handful of tags involved.
This guide explains the format, the common attributes, the difference between an M3U playlist and an HLS .m3u8 manifest, how to edit one safely and how to fix typical errors. Every example uses example.com and made-up channel names.
Quick answer: An M3U file starts with
#EXTM3U. Each channel is a#EXTINFline (duration, attributes, display name) followed by a stream URL on the next line. Attributes such astvg-id,tvg-logoandgroup-titlelink the channel to guide data, a logo and a category.
What does an M3U file look like?
#EXTM3U x-tvg-url="https://example.com/guide/epg.xml.gz"
#EXTINF:-1 tvg-id="ExampleNewsHD.uk" tvg-name="Example News HD" tvg-logo="https://example.com/logos/example-news.png" group-title="News",Example News HD
https://example.com/streams/example-news-hd.m3u8
#EXTINF:-1 tvg-id="ExampleSport1.uk" tvg-name="Example Sport 1" group-title="Sport",Example Sport 1
https://example.com/streams/example-sport-1.ts
Reading it line by line:
#EXTM3Uis the header and must be the first line.#EXTINF:-1begins a channel entry. The number is the duration in seconds;-1means unknown or continuous, which is typical for live streams.- The attributes follow, written as
name="value". - After the comma comes the display name the player shows.
- The next line is the stream address.
The "M3U" name comes from MP3 URL, a list of audio files, and the extended #EXT tags were added later. Files saved as UTF-8 may use the .m3u8 extension.
What do the attributes mean?
| Attribute | Purpose |
|---|---|
tvg-id |
Matches the channel to a channel id in the EPG (guide) file |
tvg-name |
Name used for EPG matching in some players |
tvg-logo |
Address of the channel logo image |
group-title |
Category folder the channel is placed in |
url-tvg or x-tvg-url |
In the header: the address of the EPG file |
These attributes are conventions that many players follow, not a single enforced standard, so support differs between apps. A player that ignores an attribute simply skips it. Some players also support extra tags such as tvg-shift for time offsets or tvg-chno for channel numbers; check your app's documentation before relying on them.
What are the catch-up attributes?
Catch-up (watching a programme that has already aired) is signalled in some playlists by attributes such as catchup, catchup-days and catchup-source, which tell a supporting player how to build the address for past programmes. These are player-specific conventions, so a playlist that works in one app may not offer catch-up in another. See our guide to catch-up, timeshift and recording.
What is the difference between an M3U playlist and an HLS .m3u8 file?
Both use the same file format family and often the same extension, which causes confusion.
| IPTV channel playlist | HLS media playlist | |
|---|---|---|
| Lists | Many channels | Small video segments of one stream |
| Purpose | Lets you choose what to watch | Lets the player fetch the next chunk |
| Tags | #EXTINF with channel attributes |
#EXT-X- tags such as #EXT-X-TARGETDURATION |
| Edited by | You | The streaming server |
An HLS manifest is generated and refreshed by the server for each stream, so you never edit it. A channel playlist is the list you manage. A channel entry in your playlist can point to an HLS manifest, as the first example above does. Related reading: what is IPTV?.
How do I edit an M3U file safely?
- Make a copy first so you can go back.
- Use a plain text editor, not a word processor. On a Mac, TextEdit must be set to plain text; VS Code, Notepad++ or Sublime Text avoid the problem.
- Keep every
#EXTINFline directly above its address, with no blank line between. - Do not alter the quotation marks around attribute values. Smart quotes break parsing.
- Save as UTF-8 so accents in channel names survive.
- Re-import into your player and check a few entries.
To remove a channel, delete both its #EXTINF line and the address beneath it. To reorder, move the pair together.
What are the most common M3U errors?
| Symptom | Likely cause |
|---|---|
| Player says the file is invalid | #EXTM3U missing from the first line, or a hidden character before it |
| Channels have no names | Missing comma before the display name |
| Channel opens but nothing plays | The address is wrong or the stream has gone offline |
| No guide data | tvg-id does not match the EPG, or the EPG is not loaded; see the EPG XMLTV guide |
| Odd characters in names | File not saved as UTF-8 |
| Logos missing | The logo address is wrong or the image host blocks hotlinking |
Also keep in mind that playlists are only a list of addresses. Your rights to the content they point to depend on the licensing of the source; read is IPTV legal?.
Where can I get help?
Ask in the EPG and guides forum. If you share a file, replace every real address and name with example.com and fake names first, and never post logins or tokens.
How do I check that a playlist is well formed?
A quick manual check catches most problems before you import a file into a player:
- The very first line is
#EXTM3U, with nothing before it, not even a blank line. - Every
#EXTINFline is followed directly by exactly one address line. - Attribute values are in straight double quotes, and there is a comma before the display name.
- Addresses begin with a scheme such as
https://and contain no spaces. - The file is saved as plain UTF-8 text.
You can also open the file in a media player that supports playlists, such as VLC, and see whether the entries load. A text editor's search function helps you find a stray character or duplicate entries.
Why do some playlists have thousands of lines?
Playlists can grow large because every channel needs two lines, and attributes add length. Large files are slower to load and harder to manage on low-powered devices. If a player struggles, split the file into smaller playlists by category, or remove entries you never watch. Keep the original copy untouched so you can rebuild a smaller version when needed.
Can I use relative paths or local files?
Yes, for your own content. A playlist can point to local files or network shares you own, such as a home media server, and that is a legitimate use of the format. For your own library, the format works like a music playlist. Players differ in how they handle relative paths, so test with a short list first. Home streaming setups are covered in our Plex and Jellyfin guide.
Frequently asked questions
Is M3U the same as M3U8?
Both are playlist formats. M3U8 usually means the UTF-8 version. HLS also uses .m3u8 for its own manifests, which are a different kind of file.
What is tvg-id for?
It links a playlist channel to the matching channel in an EPG file so the player shows the right programme guide.
Can I edit an M3U on my phone or TV?
Yes, with a text editor app, but a computer makes edits easier and less error-prone.
What does -1 mean in #EXTINF:-1?
It means the duration is unknown, which is normal for live streams.
Related guides
EPG and XMLTV Guide: How TV Listings Work in IPTV Players
Understand EPGs and the XMLTV format: channel ids, programme times, matching tvg-id, loading an EPG URL, refresh rates, .xml.gz files and troubleshooting.
5 min read
IPTV basicsIPTV Glossary: 60+ Terms Explained in Plain English
An A–Z IPTV glossary in plain British English: EPG, XMLTV, M3U, tvg-id, HLS, HEVC, multicast, catch-up, Widevine and more, with links to our deeper guides.
7 min read
IPTV basicsWhat Is IPTV? A Plain-English Guide to How It Works
What is IPTV? A plain-English UK guide to how internet TV works, from streams and HLS to multicast, plus legal and unlicensed services and the kit you need.
6 min read
DevicesAndroid TV Box Buying Guide: What to Look For in 2026
How to choose an Android TV or Google TV box: certification, Widevine L1, chipset, memory, codecs, Ethernet, updates, and how to spot an uncertified box.
6 min read