Skip to content
Vikings IPTV
Streaming Technology

How to Create Your Own IPTV Playlist (M3U) From Legal Sources

Learn how to create an M3U playlist for IPTV by hand: the file format, tags for names, logos and groups, legal stream sources, editing tools and testing.

By Vikings IPTV Editorial TeamUpdated 7 min read

Lines of text in an editor on a laptop screen
Photo: Artem Sapegin / Wikimedia Commons · CC0 · cropped

An M3U playlist looks technical until you open one. It is a plain text file: a line describing a channel, a line with its address, repeated. You can write one in Notepad in five minutes. Making your own is a good way to understand how IPTV works, to tidy up a list you already have, or to gather streams you are entitled to watch into one place.

This guide shows the format, the tags that control how channels appear, where legitimate streams come from, and how to edit and test a playlist.

How do you create an M3U playlist for IPTV?

To create an M3U playlist, open a text editor, type #EXTM3U on the first line, then add two lines for each channel: an #EXTINF line with the channel's name and details, followed by the stream's web address. Save the file with the .m3u extension in UTF-8 encoding and open it in an IPTV player.

The format, line by line

Here is a complete two-channel playlist.

#EXTM3U
#EXTINF:-1 tvg-id="news.example" tvg-logo="https://example.com/news.png" group-title="News",Example News
https://example.com/live/news/playlist.m3u8
#EXTINF:-1 tvg-id="weather.example" group-title="Local",Example Weather
https://example.com/live/weather/playlist.m3u8
PartMeaning
#EXTM3UMarks the file as an extended M3U playlist. Must be the first line.
#EXTINF:-1Starts a channel entry. -1 means a live stream with no fixed length.
tvg-id="..."The ID used to match the channel to programme guide data
tvg-logo="..."Address of a logo image
group-title="..."The group or category the channel appears under
,Example NewsThe display name, after the comma
The next lineThe stream address

Only the name and the address are essential. The tags make the list pleasant to use.

Step by step

  1. Open a plain text editor. Notepad on Windows, TextEdit on Mac (choose Format > Make Plain Text), or any code editor. Not a word processor.
  2. Type #EXTM3U on the first line.
  3. Add each channel as an #EXTINF line followed by its address.
  4. Use consistent group names. "News" and "news" are two different groups.
  5. Save as playlist.m3u with UTF-8 encoding. On Windows, set the file type to "All files" so it does not become playlist.m3u.txt.
  6. Test it in VLC before loading it on a TV.

The background on the file type itself is in what is an M3U file?

A playlist is only a list of addresses. What matters is whether you are entitled to the streams it points to.

SourceNotes
Your own IPTV subscriptionYour provider's playlist is yours to rearrange for personal use
A home TV tunerNetwork tuners that receive antenna channels publish a playlist for your own network
Your own cameras and media serverStreams you produce yourself
Public streams from broadcastersSome public, government and community broadcasters publish stream addresses for general use; check their terms
Public-domain and openly licensed channelsPublished by their owners for free use

Three things to avoid:

  • Copying stream addresses out of a broadcaster's website or app when its terms do not permit it. Being able to find an address does not make it yours to use.
  • "Free IPTV" playlists from forums and file-sharing sites. They are almost always unlicensed, they break constantly, and the sites hosting them are a common source of malware.
  • Sharing your subscription's playlist. It contains your login. Anyone with the file can use your connections, and sharing normally breaches the provider's terms.

IPTV technology is legal; a stream needs the rights holder's permission. See our overview of IPTV legality.

Editing a playlist you already have

The most common reason to work on a playlist is to tidy one from your provider: thousands of channels reduced to the fifty you watch.

  1. Download the playlist using your M3U link in a browser, and save the file.
  2. Open it in a text editor.
  3. Delete the entries you do not want. Each entry is two lines; remove both.
  4. Rename groups by changing group-title.
  5. Reorder by moving pairs of lines.
  6. Save and load the file into your player.

One limitation: a saved file is a snapshot. When your provider changes a stream address, your copy will not update. For that reason, most people are better off tidying inside the player instead, by hiding groups and building favourites. See how to organize your TiviMate channel list.

M3U editors

For large playlists a dedicated editor is easier than a text editor. An M3U playlist editor shows channels in a table, where you can sort, filter, rename, regroup and delete in bulk.

They come in three kinds.

TypeGood forCaution
Desktop editorsWorking offline on a saved fileNone in particular
Any spreadsheet or code editorBulk find-and-replaceEasy to break the two-line structure
Online editorsConvenience, hosted output linksYour playlist, including your login, is uploaded to a third party

If you use an online editor, remember that you are handing your credentials to another company. Read its privacy terms, or use an offline tool.

Adding a programme guide

A playlist has no programme information. That comes from a separate XMLTV file, matched to channels through tvg-id.

  • If your streams come from a provider, use the guide link it supplies and keep the tvg-id values unchanged.
  • For a tuner, the tuner's software usually provides guide data.
  • A guide link can be included in the first line: #EXTM3U url-tvg="https://example.com/guide.xml".

How matching works is explained in EPG sources for IPTV.

Testing your playlist

  1. Open VLC.
  2. Choose Media > Open File and select the playlist, or drag the file onto VLC.
  3. Open the playlist view and try each channel.

If a channel fails in VLC, it will fail everywhere. See how to watch IPTV on VLC.

Common mistakes

ProblemCauseFix
Player says the file is invalidFirst line is not #EXTM3UAdd it
Nothing loadsSaved as .m3u.txt or as a rich-text documentSave as plain text with the right extension
Accented names look wrongNot saved as UTF-8Re-save with UTF-8 encoding
A channel shows but will not playAddress mistyped or stream offlineTest the address alone in VLC
Channels in the wrong groupInconsistent group-title spellingStandardise the names
No guide dataMissing or mismatched tvg-idMatch the IDs to the guide source
Two channels mergedA missing line breakCheck each entry is exactly two lines

Using the playlist on your devices

  • Computer: open the file directly.
  • TV players: most want a web address rather than a file. Some can read a file from USB storage or a home network share.
  • Hosting: if you put a playlist online so a TV can reach it, keep the link private. Anyone with it can use what is inside.

How to load a link in each major app is covered in how to use an M3U link for IPTV.

Frequently asked questions

Can I make my own IPTV playlist?

Yes. An M3U playlist is a plain text file listing channel names and stream addresses, which you can write in any text editor.

Creating the file is legal. What matters is the streams in it: you need to be entitled to watch them, for example through your own subscription, tuner or streams published for public use.

What program do I need to make an M3U file?

Any plain text editor, such as Notepad or TextEdit. Dedicated M3U editors make large playlists easier to manage.

What is the difference between M3U and M3U8?

M3U8 is an M3U file saved in UTF-8 encoding. For IPTV playlists the two are used interchangeably.

Why will my M3U playlist not load?

Usually because the first line is missing, the file was saved with the wrong extension or as rich text, or an address is mistyped.

Summary

To create an M3U playlist, start with #EXTM3U, add an #EXTINF line and an address for each channel, and save as plain UTF-8 text. Use tags for logos, groups and guide matching, fill it only with streams you are entitled to, and test in VLC.

Our plans include an M3U link and guide data you can organise to suit yourself.

Streaming Technology

What Is an M3U File? How to Open and Use One

An M3U file is a plain text playlist of media addresses. Learn what it contains, how M3U and M3U8 differ, how to open one and how IPTV uses the format.

Updated · 6 min read

Streaming Technology

How to Use an M3U Link for IPTV (Every Major App)

Learn how to use an M3U link for IPTV: what the URL contains, how to add it in VLC, TiviMate, Smarters, Kodi and smart TV apps, and how to fix one that fails.

Updated · 7 min read

Streaming Technology

EPG Sources for IPTV: How XMLTV Guides Work

EPG sources supply the programme guide in your IPTV player. Learn how XMLTV works, where a guide link comes from, how to add one in TiviMate and fix mismatches.

Updated · 6 min read

Need a hand with setup?

Tell us your device and app — we'll walk you through it.