Guides·8 min

By Rawnok Jahan

How to Create an M3U Playlist From Scratch (2026)

Almost everything written about M3U files assumes somebody handed you one. This is the opposite guide: you have some stream URLs, or a handful of sources you want in one place, and you want to build the playlist yourself.

Good news. An M3U file is plain text. You can write one in Notepad, TextEdit, or any editor you already have, and it will work in every player that reads M3U. There is no special software, no paid tool, and no account required. The format is about as simple as file formats get.

Here is the whole thing, start to finish.

The honest framing: Tuneline is a media player for content you provide. This guide shows you how to build a playlist out of sources you already have the right to use. It ships with no list and no content of its own.

What an M3U File Actually Is

An M3U is a table of contents, not a container. It holds no video and no audio. It is a text file listing names and addresses, and a player reads it top to bottom and builds a library from what it finds. (Full format breakdown here.)

That is why you can write one by hand. There is no binary structure to get wrong, no header checksum, no compression. If you can type a URL, you can author a playlist.

The Minimum Viable Playlist

The simplest valid M3U is a list of URLs, one per line:

https://example.com/stream-one.m3u8
https://example.com/stream-two.m3u8

That genuinely works. Every player will load it. But it is horrible to use, because nothing has a name — you get a list of raw URLs and no idea which is which.

So in practice everyone uses extended M3U, which adds one metadata line before each entry:

#EXTM3U
#EXTINF:-1,First Source
https://example.com/stream-one.m3u8
#EXTINF:-1,Second Source
https://example.com/stream-two.m3u8

Three rules and you have the entire format:

  1. #EXTM3U on line one. This single line is what tells a player "expect metadata below". Leave it out and many players fall back to the bare-URL mode above, losing every name you wrote.
  2. #EXTINF: before each entry. The number after the colon is duration in seconds. For anything live or open-ended, use -1. After the comma comes the display name.
  3. The address on the very next line. One entry, one address, immediately after its #EXTINF line.

Adding Logos, Groups and Guide IDs

The bare format gets you a working list. A few optional attributes turn it into something pleasant to browse. They go inside the #EXTINF line, before the comma:

#EXTM3U
#EXTINF:-1 tvg-id="source.one" tvg-logo="https://example.com/logo1.png" group-title="News",First Source
https://example.com/stream-one.m3u8
#EXTINF:-1 tvg-id="source.two" tvg-logo="https://example.com/logo2.png" group-title="Sport",Second Source
https://example.com/stream-two.m3u8

What each one buys you:

AttributeWhat it doesWorth setting?
tvg-idMatches this entry to a guide (EPG) feed so schedule data lines upOnly if you use a guide. If you do, this is the single most important attribute.
tvg-logoURL of an icon shown next to the nameNice to have. Must be a reachable image URL.
group-titleThe category this entry files underYes. This is what turns a flat list into a browsable menu.
tvg-nameAn alternate name used for guide matchingOnly if tvg-id is unavailable and your player matches by name.

group-title is the one that changes your daily experience most. Players build their category sidebar directly from it, so a playlist with sensible groups is instantly navigable and one without is an endless scroll. (More on organising a playlist into categories.)

If you plan to attach a guide, get tvg-id right at authoring time. Matching a guide to a playlist afterwards, by hand, across dozens of entries, is genuinely miserable. (How guide matching works.)

Step by Step: Building the File

On Windows

  1. Open Notepad. Not Word, not WordPad — you want a plain text editor with no formatting.
  2. Type your playlist using the format above.
  3. File → Save As.
  4. Set Save as type to All Files (*.*). This step is the one everyone misses.
  5. Name the file myplaylist.m3u — with the extension typed out.
  6. Set Encoding to UTF-8.

If you skip step 4, Windows quietly saves myplaylist.m3u.txt and no player will recognise it.

On macOS

  1. Open TextEdit.
  2. Format → Make Plain Text (⇧⌘T). TextEdit starts in rich-text mode, which will corrupt the file.
  3. Type your playlist.
  4. File → Save, name it myplaylist.m3u.
  5. When macOS offers to append .txt, choose Use .m3u.

On Android or iOS

Phone text editors vary wildly in whether they let you control the file extension. It is usually less painful to write the file on a computer and move it across, or to author it in any editor that can save with an arbitrary extension.

Which Extension: .m3u or .m3u8?

Both work. The practical difference is text encoding:

  • .m3u8 signals UTF-8 content, which means non-English names, accents and non-Latin scripts survive correctly.
  • .m3u historically implied a local, legacy encoding, and some older software still treats it that way.

Save as .m3u8 with UTF-8 encoding unless you have a specific reason not to. Every modern player reads both, and you avoid an entire category of mangled-characters bug. The one caveat: a few older TV apps only recognise .m3u, so if a device flatly refuses your file, renaming the extension is a cheap thing to try.

Loading Your Playlist

Once saved, hand it to a player.

On desktop, most players can open a local file directly. In Tuneline on macOS, Windows or Linux, choose Add Source, pick the local file, and it loads immediately.

On phones and TVs, the reliable path is a URL rather than a local file, because mobile and TV apps are sandboxed away from arbitrary filesystem locations. If you want the same hand-made playlist on your TV, host the file somewhere it can be fetched over HTTPS and add it by address instead. (Here's how to turn a local M3U into a URL.)

One thing worth knowing before you invest an hour in a hand-authored file: a local file:// playlist cannot sync to the cloud. Cloud sync needs an address it can reach from another device, and a path on your own hard drive is not that. Hosting it as a URL makes it portable across every device you own.

The Five Mistakes That Break a Hand-Made Playlist

In rough order of how often each one is the culprit:

  1. The file is really a .txt. Windows hides extensions by default, so playlist.m3u.txt looks like playlist.m3u in Explorer. Turn on View → File name extensions and check.
  2. #EXTM3U is missing or is not the first line. A blank line or a stray character before it, and the player treats the whole file as a bare URL list. Every name you typed vanishes.
  3. The URL is not on the line directly after its #EXTINF. A blank line between them orphans the entry.
  4. Rich text instead of plain text. A file authored in Word or in TextEdit's default mode contains formatting bytes. It looks fine on screen and parses as garbage.
  5. A smart-quote in an attribute. Editors that autocorrect " into " produce attributes no parser recognises. This is the sneakiest one because the file looks perfect. Plain text editors do not do this; word processors do.

If your file loads but shows nothing, work through the channels-not-loading checklist — at that point the format is fine and the addresses are the problem.

A Template to Copy

#EXTM3U
#EXTINF:-1 tvg-id="example.news" tvg-logo="https://example.com/news.png" group-title="News",Example News
https://example.com/news/index.m3u8
#EXTINF:-1 tvg-id="example.sport" tvg-logo="https://example.com/sport.png" group-title="Sport",Example Sport
https://example.com/sport/index.m3u8
#EXTINF:-1 group-title="Local",Local Recording Folder Stream
http://192.168.1.50:8080/stream

Replace the addresses with your own, save as .m3u8 in UTF-8, and you have a working playlist.

Where the Sources Come From

This guide covers the file format, deliberately. Where you get the addresses that go in it is a separate question, and the answer matters.

Legitimate sources you can build a playlist from include your own home media server, network cameras and encoders on your LAN, publicly published free-to-air and FAST feeds, and any service that supplies you an address as part of a subscription you actually hold. (What FAST channels are and how to add them.) (Playing from Jellyfin, Plex or Emby.)

A player is a tool for content you have the right to watch. Building a playlist does not change where content came from.

The Bottom Line

  • An M3U is plain text. Notepad or TextEdit is all the software you need.
  • #EXTM3U first, then #EXTINF:-1,Name followed immediately by the address.
  • group-title makes it browsable; tvg-id makes a guide line up.
  • Save as .m3u8 in UTF-8 and set your editor to plain text.
  • The number one failure is a file that is secretly .txt.

Built a playlist and want somewhere to run it? Download Tuneline — free, no bundled content, and it runs on macOS, Windows, Linux, iPhone, iPad, Android, Android TV, Google TV and Apple TV.

Share this article

The fast fix

Get Tuneline free

A clean, no-account media player for macOS, Windows, Linux, Android, TV, and iOS. Bring your own playlist.

Download free

The cross-platform media player behind these answers — new platforms, sync updates, the honest build story. No spam, unsubscribe anytime.

Read this article in another language

Tuneline is a media player application. It does not provide, host, or distribute any content. You bring your own playlist, exactly as you would with VLC.

#how to create m3u playlist#create iptv playlist#make m3u file#m3u playlist template#how to create playlist m3u
Back to all posts