To create m3u playlist files from scratch sounds like programming. It is closer to writing a shopping list. Keep it simple. The file is plain text, every channel is two lines. There is no software to compile or server to configure. Once you understand the two-line pattern, you can build a playlist of your favourite free streams, combine several sources into one list, or simply understand what your IPTV provider sends you well enough to edit it when something needs fixing.

Two lines per channel. That is the whole job. That is the format. The first line starts with #EXTINF:-1 and carries the name after a comma. The second line is the stream address. Build a three-channel file in Notepad, open it in VLC. You have proved the whole thing to yourself in one sitting.

Create M3U playlist: the two lines every channel needs

An M3U file starts with a single header line, #EXTM3U, which tells the player this is a playlist. Do it once, properly. After that, every channel uses two lines. The first line starts with #EXTINF:-1 and carries the channel name after a comma. The second line is the stream address, usually an http or https link ending in .m3u8 or .ts. That is the whole format. A player reads the name from the first line, shows it in the list, and plays the address from the second line when you select it. For the background, see M3U Playlist Guide for Beginners 2026.

Build your first three-channel playlist

Open any plain text editor, such as Notepad on Windows, TextEdit on Mac in plain text mode, or any code editor. Simple as that. Type the header followed by three channels. Save the file with the extension .m3u and make sure the editor did not add .txt to the end, which is the easiest mistake to make. Then open the file in VLC with Media, Open File. You should see three entries you can click and play. If a stream does not play, the address itself is dead or blocked, not your file. Test with a known working stream first.

  • Start the file with #EXTM3U on its own line, with nothing before it.
  • Write one #EXTINF line and one stream address per channel, in that order.
  • Save as plain text with the .m3u extension, never .txt or .doc.
  • Test the file in VLC before loading it into a TV player.
  • Keep a backup copy before every edit, so a mistake costs seconds, not hours.

Adding groups, logos and guide data

A plain playlist becomes a pleasure to use once you add the optional details. That is the point. After #EXTINF:-1 you can add group-title="News" to put a channel in a group, tvg-logo="https://example.com/logo.png" to show its logo, and tvg-id="cnn.us" to link it to the programme guide. The full line then looks like #EXTINF:-1 tvg-id="cnn.us" tvg-logo="https://example.com/logo.png" group-title="News", CNN. Players use the group to build the categories you browse, the logo to make the list visual, and the tvg-id to match the channel with its guide data, so these three attributes are worth adding to every entry. How to Edit M3U Playlist: Add and Remove Channels covers that side of it in more detail.

Where do the stream addresses come from?

This is the honest limit of a home-made playlist: you can only list streams that are legally and publicly available, such as free-to-air broadcasters that publish their own streams, or streams you are authorised to use. A provider playlist such as the one from M3U Playlists is different, because the provider maintains the server addresses, refreshes dead links, and bundles 57,000+ channels with 185,000+ movies and 49,000+ series into one maintained link. Building your own list teaches you the format. A maintained provider list is what gives you a full television service.

M3U elementWhat it doesRequired?Example
#EXTM3UMarks the file as a playlistYes#EXTM3U
#EXTINF:-1Starts a channel entryYes#EXTINF:-1, CNN
Stream URLThe address the player opensYeshttps://example.com/cnn.m3u8
group-titlePuts the channel in a categoryNogroup-title="News"
tvg-logoShows the channel logoNotvg-logo="https://example.com/logo.png"
tvg-idLinks the channel to the guideNotvg-id="cnn.us"
x-tvg-urlPoints to the EPG fileNox-tvg-url="https://example.com/epg.xml"

Combining lists and keeping them tidy

Once you have two small playlists, combining them is simple: copy the channel entries from one file into the other below the header, keeping only one #EXTM3U line at the top.

Remove duplicate channels, sort the groups in a sensible order such as News, Sports, Movies, Kids and Music. That is it. Rename channels consistently so the list reads cleanly on a TV. Check the file after every merge by opening it in VLC and scrolling through the groups, because a single missing line break can hide every channel below it. The same question comes up in M3U Playlist URL Explained: How It Works.

Testing and sharing your playlist safely

Before sharing a playlist with family, test it on a second device, because a file that works in VLC on a laptop does not always behave the same in a smart TV app. No special tools needed. Keep the file under a few hundred entries for home-made lists, since huge files load slowly in basic players. Never publish a provider playlist link publicly, because it is tied to your paid account and sharing it can get the subscription blocked. Your own hand-built list of public streams is fine to share. A provider link is private and should stay that way.

Build a small test file today. Test it at peak time. Open it in VLC. The mystery disappears — a header, two lines per channel. Optional details for groups, logos and the guide. When you want a full service instead of a hobby list, the 24-hour free trial from M3U Playlists gives you a finished, maintained playlist with 57,000+ channels to load in the same way, no card required, activation over WhatsApp on +212 604 034 330.