Home ↓
IPTV Europa

M3U vs Xtream Codes: what is the difference?

M3U is a playlist file; Xtream Codes is a login-based API. Learn how each works, which one to use in your IPTV player and how the EPG fits in.

Laptop with a glowing screen in a dark room

Photo: Arbron · CC BY 2.0

M3U and Xtream Codes are two ways of giving an IPTV player access to the same channels. M3U is a text file listing every stream; Xtream Codes is a login (server, username, password) that lets the player fetch the list itself.

M3U playlists

An M3U file is plain text. It begins with #EXTM3U, and each channel takes two lines: a description line and the stream address.

#EXTM3U
#EXTINF:-1 tvg-id="news.uk" group-title="News",Example News
https://provider.example/live/user/pass/101.ts

Providers normally give you a link to this file rather than the file itself, so the player can refresh it when channels change. The extended form, sometimes labelled M3U Plus or m3u_plus, carries extra attributes such as channel logos, groups and the IDs used to match the programme guide.

Strengths: supported by virtually every player, including VLC and Kodi. Weaknesses: large lists load slowly, and the programme guide usually has to be added as a second address.

Xtream Codes API

With Xtream Codes you enter three things: the server address, a username and a password. The player then asks the server for live categories, films, series and guide data separately, which is faster and tidier than parsing one large file. Account details such as the expiry date and the number of permitted connections can also be shown inside the app.

The name comes from a panel software that was widely used by IPTV operators. The original company behind it was shut down in 2019, but the API format became a de facto standard and is still what players mean by an "Xtream Codes login".

Side by side

M3UXtream Codes
What you enterOne linkServer address, username, password
Programme guideSeparate XMLTV link in most casesLoaded automatically
Films and seriesIn the same list, if includedSeparate sections
Player supportNearly universalMost dedicated IPTV players
Typing on a TV remoteLong link, error-proneThree short fields

Because both describe the same account, an Xtream login can be written as an M3U link and many providers offer both forms.

Where the EPG fits in

The electronic programme guide tells the player what is on each channel. It is distributed in XMLTV format. With an M3U playlist you usually paste a second address for it; the tvg-id attribute in the playlist links each channel to its guide entries. With Xtream Codes the guide normally arrives without extra steps.

Converting between the two formats

Because both formats describe the same account, you can usually derive one from the other. On services that use the Xtream Codes API, the M3U link has a recognisable shape:

https://SERVER:PORT/get.php?username=USER&password=PASS&type=m3u_plus&output=ts

The server address, username and password inside that link are exactly the three values a player asks for in its Xtream Codes login screen. If you were only given a link and your player prefers a login, copy those parts out of it. If you were given a login and need a link, for example for VLC, ask your provider for the M3U address rather than guessing the format.

The M3U format itself is an informal standard that grew out of music playlists; the XMLTV project documents the guide format used alongside it.

Keeping your login secure

  • Treat an M3U link like a password. It contains your credentials in plain text.
  • Do not paste it into "playlist checker" websites. You have no idea who stores it.
  • Use https:// addresses where your provider offers them, so the login is not sent unencrypted.
  • If a link has leaked, ask your provider to reset the password.

New to the subject? Read what IPTV is first, or see how to choose an IPTV subscription.

Common problems

  • "Playlist could not be loaded": check for typing mistakes, missing http:// or https://, and stray spaces.
  • Channels load but will not play: you may have exceeded your simultaneous device limit.
  • Guide is empty or shifted by an hour: reload the EPG and check the time-zone offset in the player's settings.

Once you know which login type you have, pick a compatible app from our IPTV player comparison.

Frequently asked questions

Which is better, M3U or Xtream Codes?

If your player supports both, Xtream Codes is usually more convenient because categories, catch-up and the programme guide load automatically. M3U is the more universal format.

Is it safe to share my M3U link?

No. The link contains your credentials. Anyone who has it can use your connection slot, and providers commonly block accounts used from many locations.

Sources

  1. VLC
  2. XMLTV project

About this article

IPTV Europa Editorial Team

Researched and written by the IPTV Europa editorial team from official documentation and publicly available sources. The services and apps named here have not been tested hands-on by our team.

Last reviewed: Our editorial standards

Related reading

IPTV basics

What is IPTV and how does it work?

IPTV delivers television over the internet instead of an aerial, dish or cable. How it works, what you need and how to tell legal services apart.

3 min read

Need help choosing or setting up?

Tell us which device you use and what you want to watch on it. We will point you to the right plan and guide.