An M3U playlist is a plain text file that lists streams, one entry per channel. Each entry has an information line starting with #EXTINF, which holds the channel name, logo, group and guide ID, followed by the stream address on the next line. Once you can read those two lines, you can trim a huge playlist down to the channels you watch, fix a broken guide, or build a small playlist of your own in any text editor.
This guide is the practical, hands-on side. For the bigger picture of how M3U compares with Xtream Codes and Stalker portals, see our M3U IPTV explained overview.
Anatomy of an M3U file
Here is a small, made-up example using placeholder addresses:
#EXTM3U url-tvg="http://epg.example.com/guide.xml"
#EXTINF:-1 tvg-id="news1.us" tvg-name="News One" tvg-logo="http://logos.example.com/news1.png" group-title="News",News One HD
http://stream.example.com/live/USER/PASS/1001.ts
#EXTINF:-1 tvg-id="sports2.us" tvg-name="Sports Two" tvg-logo="http://logos.example.com/sports2.png" group-title="Sports",Sports Two
http://stream.example.com/live/USER/PASS/1002.ts
Line by line:
- #EXTM3U must be the very first line. It tells players this is an extended M3U file. Some players also read a guide link from it (url-tvg or x-tvg-url), though support varies.
- #EXTINF:-1 starts a channel entry. The -1 means the duration is unknown, which is normal for live TV.
- Attributes in key=”value” pairs describe the channel.
- The text after the last comma is the display name you see in the app.
- The next line is the stream URL.
The tags that matter
| Tag | What it does | What breaks if it is wrong |
|---|---|---|
| tvg-id | Links the channel to its guide entry in the XMLTV file | No program info for that channel |
| tvg-name | Backup name used for guide matching in some players | Guide may not match when tvg-id is missing |
| tvg-logo | Address of the channel logo image | Blank or default logo |
| group-title | Category the channel sits in | Channel lands in the wrong group or “Uncategorized” |
| tvg-chno | Channel number shown in some players | Channels appear in file order instead |
| tvg-shift | Shifts guide times by a number of hours | Guide shows programs at the wrong time |
| catchup, catchup-days | Tells supported players catch-up is available | No catch-up option in the app |
These attributes are documented for Kodi’s PVR IPTV Simple Client and are widely used by other players, though not every app reads every tag.
How to edit an M3U playlist safely
Editing is the easiest way to clean up a playlist with thousands of channels you never watch.
- Download a copy. Open your M3U URL in a browser to save the file, or ask your provider for the file.
- Open it in a plain text editor such as Notepad, TextEdit in plain text mode, or VS Code. Do not use a word processor; it can add hidden formatting.
- Delete channels in pairs. Always remove the #EXTINF line and the URL line beneath it together.
- Rename groups by changing group-title values, for example merging several sports groups into one.
- Save as UTF-8 with the .m3u extension, so accented channel names display correctly.
- Load the file in your player as a local playlist, or test it in VLC first.
Keep one thing in mind: an edited copy is a snapshot. If your provider changes stream addresses, your file will not update. Many players, including TiviMate and Kodi, let you hide groups inside the app instead, which keeps the list current.
Building a small playlist of your own
You can also write an M3U file from scratch for streams you are entitled to, such as your own network cameras, a home media server, or broadcasters that publish official public streams. Start with #EXTM3U, then add one #EXTINF line and one URL line per stream. Our VLC M3U guide shows how to open the result on any device.
Do not use random “free IPTV” lists shared online. They are usually unlicensed, break quickly and can point to unsafe servers.
Common M3U errors and how to fix them
“Invalid playlist” or nothing loads
Check that the first line is exactly #EXTM3U with no blank line or invisible character before it. Some editors add a byte order mark; re-save as UTF-8 without BOM.
Channels show but will not play
The stream URL line may be broken or wrapped onto two lines. Every URL must sit on a single line directly under its #EXTINF line. Also check that your account is active.
Guide is empty for some channels
Compare the tvg-id in the playlist with the channel id in your XMLTV file. They must match exactly, including case and dots. Fix the tvg-id, or ask your provider to correct their mapping.
Channel names look garbled
The file was saved in the wrong encoding. Re-save it as UTF-8.
Logos missing
The tvg-logo address may be dead or use http where your player expects https. Replace it or remove the attribute.
For playback problems that are not caused by the file, our IPTV connection troubleshooting guide covers network checks.
M3U vs M3U8
M3U8 is simply an M3U file saved in UTF-8 encoding. In streaming you will also see .m3u8 used for HLS stream manifests, which describe the chunks of a single stream rather than a list of channels. If a provider gives you a playlist ending in .m3u8, players treat it the same way.
Keeping your playlist private and up to date
Your M3U link and file usually contain your username and password, so treat them like a password and never post them publicly. If you would rather not maintain a file at all, an Xtream Codes login keeps everything in sync automatically.
If you need a service with a clean, well-tagged playlist, our plan, IPTV Journal, costs $89 for 12 months and includes an M3U link with guide data. You can see the plan details here. M3U is just a file format and is perfectly legal; what matters is whether the streams inside it are licensed.
FAQ
Can I open an M3U file without an IPTV app?
Yes. An M3U file is plain text, so any text editor can open it to read or edit. To actually watch the streams, you need a player such as VLC, Kodi or a dedicated IPTV app.
Why does my edited playlist stop working after a while?
Providers sometimes change stream addresses or rotate servers. A saved copy does not update, so download a fresh copy or hide groups inside your player instead of editing the file.
What does #EXTINF:-1 mean?
It marks the start of a channel entry. The -1 means the length is unknown, which is standard for live streams that have no fixed duration.
How do I get the TV guide to match my channels?
Each channel’s tvg-id must exactly match a channel id in your XMLTV guide file. If they differ, the player cannot connect the guide to the channel, so correct the tvg-id or ask your provider to fix it.
Is it safe to share my M3U playlist?
No. Most provider playlists include your login inside every stream address. Sharing it lets others use your account and may break your provider’s terms.
Get IPTV Journal: 12 months for $89
20,000+ live channels, sports, PPV, movies and series on every device.


