πŸ“ How to Create and Edit an M3U Playlist 2026

An M3U playlist is the simple text file behind most IPTV setups. This guide explains the format line by line, shows you how to build one from scratch in any text editor, how to edit it (reorder, rename, group, add logos and EPG IDs), the mistakes that break playlists β€” and the free tools that do the heavy lifting for you.

Advertisement

πŸ“„ What is an M3U file (and M3U8)?

An M3U file is a plain-text playlist. Each entry points at a media stream (a TV channel, a movie, a radio station) by its URL. IPTV players read the file top to bottom and build your channel list from it.

M3U8 is the same format saved in UTF-8 encoding β€” which is what you want whenever channel names contain accents or non-English characters (Γ©, ΓΌ, Γ±, Cyrillic, etc.). For IPTV, "M3U" and "M3U8" are used almost interchangeably; the .m3u8 extension just signals UTF-8.

πŸ”¬ Anatomy of an M3U playlist

Here is a minimal but complete example with two channels:

#EXTM3U
#EXTINF:-1 tvg-id="bbcone.uk" tvg-logo="https://example.com/logos/bbc1.png" group-title="UK",BBC One
http://your-server.com:8080/live/user/pass/12345.ts
#EXTINF:-1 tvg-id="cnn.us" tvg-logo="https://example.com/logos/cnn.png" group-title="News",CNN International
http://your-server.com:8080/live/user/pass/67890.ts

Breaking it down:

ElementWhat it does
#EXTM3UThe header. Must be the very first line of the file. Without it, players reject the playlist.
#EXTINF:-1Starts a channel entry. The -1 means "unknown/live duration" (used for live streams).
tvg-id="bbcone.uk"The EPG identifier. This must match the channel ID in your EPG (XMLTV) source so the program guide lines up.
tvg-logo="https://..."URL of the channel logo shown in the app.
group-title="UK"The category/group the channel appears under (e.g. UK, News, Sports, Kids).
,BBC OneEverything after the comma is the display name shown on screen.
The next lineThe actual stream URL. It always goes on its own line, directly below the #EXTINF line.

You may also see tvg-name (an alternate name) and tvg-shift (a time offset for EPG, in hours).

πŸ› οΈ How to create an M3U in a text editor

  1. Open a plain-text editor: Notepad (Windows), TextEdit in plain-text mode (Mac), or a code editor like VS Code or Notepad++.
  2. Type #EXTM3U on the first line.
  3. For each channel, add two lines: an #EXTINF line, then the stream URL underneath it.
  4. Save the file as UTF-8 with a .m3u (or .m3u8) extension β€” for example my-channels.m3u.
  5. In Notepad, choose "Save As", set "Encoding: UTF-8", and put quotes around the name so it doesn't become .m3u.txt.

That file can now be loaded by any IPTV player that accepts an M3U URL or file.

Advertisement

✏️ How to edit a playlist

Editing is where most people spend their time. Common tasks:

  • Reorder channels: move each channel's two lines (the #EXTINF and its URL) together up or down. Players show them in file order.
  • Rename a channel: change the text after the comma on the #EXTINF line. The stream URL stays the same.
  • Group channels: set group-title="..." to organise channels into tidy categories.
  • Add logos: point tvg-logo="..." at a logo image URL.
  • Add EPG IDs: set tvg-id="..." to the exact ID used in your EPG source so the guide appears. This is the single most common reason guides are blank.
  • Remove channels: delete both lines of any channel you don't want.

⚠️ Common mistakes

MistakeWhy it breaks
Missing #EXTM3U headerPlayers treat the file as invalid and load nothing.
URL on the same line as #EXTINFThe stream URL must be on its own line, directly below the info line.
Saved as .m3u.txtHidden extension β€” the player can't find a real M3U. Show file extensions and rename.
Wrong or blank tvg-idThe EPG won't match, so the program guide stays empty.
Smart quotes (" ") instead of straight quotes (" ")Word processors insert curly quotes that break attributes. Always use a plain-text editor.
ANSI encoding with special charactersAccents/Cyrillic turn into garbled text. Save as UTF-8.
Extra blank lines between info and URLSome players lose the pairing. Keep each pair on consecutive lines.

⚑ Do it the easy way β€” free tools

Hand-editing big playlists is tedious and error-prone. We built free, browser-based tools that do this for you β€” nothing is uploaded to a server, everything runs locally in your browser:

  • M3U Editor β€” reorder, rename, regroup, add logos and fix tvg-id values with a visual interface, then export a clean playlist.
  • M3U Validator β€” paste your playlist or URL and instantly see structural errors and broken entries before you load it into a player.
  • M3U Merger β€” combine several playlists into one, removing duplicates.

❓ M3U vs Xtream Codes

A plain M3U URL and an Xtream Codes login often point at the same service β€” they're just two ways to connect. An Xtream login (server URL + username + password) lets apps build the M3U for you and usually delivers VOD, series and EPG more cleanly. If you'd rather hand-manage a static file, M3U is fine. Read the full comparison in M3U vs Xtream Codes.

πŸ“š Read more