How to Create IPTV Playlist Files: A Simple Step-by-Step M3U Guide
If you want to know how to create IPTV playlist files, the good news is that it takes only a plain text editor and a few minutes. An IPTV playlist is a text file, usually in M3U format, that lists channel names and their stream addresses so an IPTV player can display them as a tidy channel list. This guide shows you how to write the file yourself, test it, fix common errors and keep it organized. It covers only legal sources, such as streams you have rights to, free channels that broadcasters publish openly, and links from a licensed provider you subscribe to.

Key takeaways - An IPTV playlist is a plain text file in M3U format that starts with
#EXTM3U. - Each channel needs two lines: an#EXTINFinformation line and the stream URL. - Save the file with UTF-8 encoding and a.m3uor.m3u8extension. - Test the playlist in a free player such as VLC before loading it on your TV. - Only add streams you are legally allowed to watch.
The Short Answer
To create an IPTV playlist, open a text editor, type #EXTM3U on the first line, add an #EXTINF line followed by a stream URL for each channel, and save the file as .m3u with UTF-8 encoding. Then load it into any IPTV player that supports M3U.
Here is the smallest working example:
#EXTM3U
#EXTINF:-1,My Channel
https://example.com/stream/live.m3u8
That is all a basic playlist needs. The rest of this guide explains how to add logos, groups and an electronic program guide (EPG), and what to do when something does not play.
What You Need Before You Start
You need a text editor, at least one legal stream URL and an IPTV player to test the result. No paid software is required.
- A plain text editor: Notepad on Windows, TextEdit on Mac in plain text mode, or a free editor such as Notepad++. Do not use word processors like Word, which add hidden formatting.
- Legal stream URLs: links from your licensed IPTV provider, public streams that broadcasters officially publish, or streams from your own media server or camera.
- A test player: VLC media player is free and opens M3U files on most computers.
- Optional extras: channel logo image URLs and an EPG (XMLTV) address if your provider gives you one.
M3U vs M3U8: Which Format Should You Use?
Both formats work in most IPTV players. The main difference is character encoding. According to the M3U article on Wikipedia, the .m3u8 extension indicates a UTF-8 encoded playlist. The same extension is also used for HLS streaming manifests.
| Feature | .m3u | .m3u8 |
|---|---|---|
| File type | Plain text playlist | Plain text playlist |
| Encoding | Often system default, UTF-8 recommended | UTF-8 |
| Accents and non-Latin names | Can display incorrectly if not saved as UTF-8 | Display correctly |
| Player support | Very wide | Very wide |
| Best for | Simple personal playlists | Playlists with international channel names |
If your channel names contain accents or non-Latin characters, save the file as UTF-8 whichever extension you choose.
How to Create IPTV Playlist Files: Step-by-Step Setup
The process has three parts: write the header, add your channels and save the file correctly. Follow these steps in order.
- Open your plain text editor and create a new, empty document.
- Type
#EXTM3Uon the very first line, with no spaces before it. - On the next line, type
#EXTINF:-1,followed by the channel name, for example#EXTINF:-1,News Channel. - On the line directly below, paste the full stream URL for that channel.
- Repeat steps 3 and 4 for every channel you want to add.
- Click Save As, choose UTF-8 as the encoding, and name the file something like
myplaylist.m3u. - Make sure the file type is set to "All files" so the editor does not add
.txtto the end. - Open the file in VLC to confirm each channel plays.
Adding Logos, Groups and Channel IDs
You can add extra attributes inside the #EXTINF line to make your playlist look professional. Most modern IPTV players read them.
#EXTM3U url-tvg="https://example.com/epg.xml"
#EXTINF:-1 tvg-id="news.channel" tvg-name="News Channel" tvg-logo="https://example.com/logos/news.png" group-title="News",News Channel
https://example.com/stream/news.m3u8
#EXTINF:-1 tvg-id="sports.channel" tvg-name="Sports Channel" tvg-logo="https://example.com/logos/sports.png" group-title="Sports",Sports Channel
https://example.com/stream/sports.m3u8
What each attribute does:
url-tvg(in the header): points to an XMLTV EPG file for program guide data. Some players usex-tvg-urlinstead.tvg-id: matches the channel to its entry in the EPG.tvg-name: the channel name used for EPG matching.tvg-logo: a direct link to the channel logo image.group-title: puts channels into categories such as News, Sports or Kids.- The text after the comma: the name that appears in your channel list.

Local File or Hosted URL?
You can load your playlist as a file on your device or host it online and enter its URL in your player. Many TV apps accept only a URL, so hosting is often more convenient.
| Option | How it works | Advantages | Drawbacks |
|---|---|---|---|
| Local file | File stored on your phone, PC or USB stick | Private, no internet hosting needed | Must re-copy the file after every edit |
| Hosted URL | File uploaded to your own web space or a cloud storage direct link | Edit once, every device updates | Needs a direct download link that the player can read |
If you use cloud storage, make sure the link downloads the raw file directly instead of opening a preview page, or your player will not be able to read it.
Common Problems and How to Fix Them
Most playlist errors come from formatting mistakes, wrong encoding or a stream URL that no longer works. Check these issues first.
- "Invalid playlist" or nothing loads: confirm the first line is exactly
#EXTM3Uand that the file is not saved asmyplaylist.m3u.txt. - Channel names show strange symbols: re-save the file with UTF-8 encoding.
- A channel appears but will not play: open the stream URL directly in VLC. If it fails there too, the link is offline, has changed or requires a login.
- Channel names and URLs are mixed up: every
#EXTINFline must be followed immediately by its URL, with no blank line or comment between them. - Logos do not appear: the
tvg-logolink must point directly to an image file such as.pngor.jpg, and it must be publicly reachable. - EPG is empty: make sure each
tvg-idmatches the channel ID used in the EPG file exactly, including capitalization. - Works in VLC but not on the TV: check your TV app's supported formats in the official help pages, for example Amazon Fire TV help if you use a Fire TV device.
Quick Troubleshooting Table
| Symptom | Most likely cause | Fix |
|---|---|---|
| Playlist will not open | Missing header or wrong extension | Add #EXTM3U, rename to .m3u |
| Garbled characters | Wrong encoding | Save as UTF-8 |
| One channel buffers or fails | Stream offline or overloaded | Test the URL alone, replace if needed |
| All channels fail on one device | App or network issue | Test on another device, restart router and app |
| No program guide | EPG URL or IDs incorrect | Check url-tvg and tvg-id values |
Tips to Get the Best Result
A good playlist is clean, organized and easy to maintain. These habits save time later.
- Use clear group names. Keep categories short and consistent, such as "News", "Sports" and "Movies", so your player menus stay tidy.
- Order channels on purpose. Players usually show channels in the order they appear in the file, so put your favorites at the top.
- Keep a backup. Save a copy before big edits so you can restore a working version quickly.
- Test after every change. A single missing line break can shift every channel below it.
- Remove dead links regularly. Public streams can change addresses, so check your list from time to time.
- Protect private links. If your provider's URLs contain your username or password, do not share the playlist publicly.
- Stay legal. Only include streams you have the right to watch. Avoid lists that contain pirated channels, which can expose you to legal risk and security problems.

Get your IPTV subscription now
Setup in minutes · all your devices · help on WhatsApp
Frequently Asked Questions
Is it legal to create an IPTV playlist?
Yes, creating an M3U playlist is legal because it is just a text file. What matters is the content: the streams you add must come from licensed providers, broadcasters that publish them openly, or your own media. Adding pirated streams is not legal.
Can I create an IPTV playlist on my phone?
Yes. Any plain text editor app on Android or iOS can create an M3U file. Type the same lines described above, save the file with a .m3u extension and UTF-8 encoding, then open it in an IPTV player app.
What is the difference between an M3U playlist and an Xtream Codes login?
An M3U playlist is a file or URL listing all channels. An Xtream Codes style login uses a server address, username and password so the app fetches the channel list automatically. Many licensed providers offer both options for the same subscription.
How many channels can one playlist contain?
There is no fixed limit in the M3U format itself. Very large playlists can load slowly on low-power devices, so splitting them into smaller lists or removing unused channels can improve performance.
Why does my playlist work on my computer but not on my smart TV?
Smart TV apps often support fewer stream formats or accept only playlist URLs, not local files. Host the playlist online with a direct link, and check your TV maker's support pages for supported formats and apps.
Conclusion
Learning how to create IPTV playlist files is mostly about getting a few details right: the #EXTM3U header, an #EXTINF line paired with each stream URL, and UTF-8 encoding. Add logos, groups and an EPG to make the list easier to browse, test every change in VLC and keep your sources legal.
Want more practical guides on M3U files, IPTV players and device setup? Visit iptv-playlist.site for step-by-step tutorials that help you build, organize and play your playlists with confidence.
IPTV Playlist Blog
IPTV, Is It Legal? US Laws, Risks and How to Stay on the Right Side
Is IPTV Legal in USA? What US Law Says and How to Stay Safe