Education·8 min

By Shamir

Xtream Codes to M3U: How the Conversion Actually Works (2026)

Search for "convert Xtream Codes to M3U" and you get a pile of websites offering to do it for you, usually asking for your username and password first.

You do not need any of them. There is nothing to convert. An Xtream login and an M3U playlist are two different doors into the same server, and turning one into the other is a URL pattern you can type yourself in about ten seconds.

Here is the pattern, why it works, and when you should actually use each door.

The Two Doors

When you get access to a source in Xtream form, you receive three things: a server address, a username, and a password.

That server speaks two protocols at once:

DoorWhat the player sendsWhat comes back
Xtream APIStructured requests for categories, streams, guide data, on-demand itemsJSON the player turns into a browsable library
M3U outputOne request for a playlistA generated text playlist of every entry your account can reach

Same server, same account, same content. The M3U is not a separate thing the provider maintains — the server builds it on demand from the same database the API reads. That is why "conversion" is the wrong word. You are asking the same server to answer in a different format.

(If you are not sure which format you even have, start here.)

The URL Pattern

Given a server, username and password, the M3U output lives at:

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

Substitute your own values and that is your playlist URL. Nothing else is required.

The two parameters at the end are the ones worth understanding:

type=

  • m3u_plus — includes the extended metadata: display names, logos, group titles, guide IDs. This is the one you want.
  • m3u — bare entries, no metadata. You get a flat list of nameless items. Almost never useful.

output=

  • ts — raw MPEG-TS streams. Broadest compatibility; works with essentially every player. (What a .ts stream actually is.)
  • m3u8 — HLS. Better behaved on flaky connections because it is segmented, and generally the friendlier option on mobile.
  • hls — an alias for the same idea on some server builds.

If a playlist loads but nothing plays, swapping output=ts for output=m3u8 is the single highest-yield thing to try. Some servers only transcode for one of the two, and some devices strongly prefer HLS.

The Guide URL Too

The same trick works for the schedule data. The guide feed lives at:

http://SERVER:PORT/xmltv.php?username=USER&password=PASS

That returns XMLTV, which is what any player wants for a programme guide. Because the provider generates both from the same database, the guide IDs in this file already match the tvg-id values in the m3u_plus playlist — which is the hard part of guide setup, solved for free. (Why guide matching is usually the painful bit.)

Why You Should Not Use a Conversion Website

Look at that URL again. It contains your username and password in plain text.

Any website offering to "convert" for you is asking you to hand over working credentials to a stranger, in exchange for performing a string substitution you could have done in Notepad. There is no computation happening that justifies the trust.

Concretely, whoever runs that site can:

  • Use your account themselves, which on a connection-limited source means you get kicked off.
  • Sell or leak the credentials.
  • Keep them long after you have forgotten the site existed.

The same reasoning applies to any "playlist checker" or "M3U tester" that wants credentials. Build the URL yourself. It is a copy-paste and a find-replace.

If you have already used one, change your password at the source if your provider lets you.

Which Door Should You Actually Use?

Having established that you can get an M3U from an Xtream login, here is the part most guides skip: you often should not.

Adding the source as Xtream, where your player supports it, is usually better:

Xtream APIGenerated M3U
Live entriesYesYes
On-demand movies and seriesYes, as a proper browsable library with metadataFlattened into the list, or missing entirely
Series seasons and episodesStructuredNot represented
Guide dataFetched through the API automaticallyNeeds the separate XMLTV URL added by hand
Catch-up / timeshiftExposed by the API where the provider supports itDepends on per-entry attributes being present
Account info (expiry, connections)VisibleNot available
Portability to any playerNarrower — the player must speak XtreamUniversal. Every player reads M3U.
Credentials in the URLHeld as fieldsEmbedded in the address itself

The short version: use Xtream if your player supports it, and use the M3U output when it does not.

The common reason to want the M3U form is a player, a TV app or a device that only accepts a playlist URL. That is a completely legitimate need, and the URL pattern above is how you meet it. (Movies and series specifically depend on this choice.)

In Tuneline, both doors are first-class: add the source as Xtream with server, username and password, or paste an M3U URL. Same app, and you can keep both.

Going the Other Direction

People also search for converting an M3U link into an Xtream login. That one does not work, and it is worth saying why.

An M3U URL is output. An Xtream login is input. You can generate a playlist from credentials because the server offers that endpoint, but you cannot reconstruct a working API login from a list of stream addresses — the playlist simply does not contain the account structure.

The one exception is when the playlist you were given is itself a get.php URL. In that case the credentials are already sitting in the query string, and you can read your own server, username and password straight out of the address you were handed. That is not a conversion, it is just reading the URL. It also demonstrates, uncomfortably, how little protection there is around these links.

Troubleshooting

SymptomLikely cause
Playlist downloads but is empty or a single error lineWrong username/password, or the account has expired. Load the URL in a browser and read the text.
Entries appear but nothing playsTry output=m3u8 instead of output=ts.
Names are missing, everything is a numberYou used type=m3u instead of type=m3u_plus.
Works on one device, "max connections" on the nextThe account limits simultaneous connections. Each device counts. How connection limits work.
Playlist loads, guide is blankYou have not added the xmltv.php URL, or the two disagree on IDs.
Nothing at all, on any URL shapeConfirm the port. Xtream servers frequently run on a non-standard port, and omitting it silently fails.

A worthwhile habit: paste the get.php URL into a browser first. You will see either a text playlist or a plain error message, and that tells you instantly whether the problem is the credentials or the player.

The Bottom Line

  • Xtream and M3U are two doors into the same server. There is no conversion.
  • The playlist is at get.php?username=…&password=…&type=m3u_plus&output=ts.
  • The guide is at xmltv.php?username=…&password=….
  • Never hand credentials to a conversion website. You are paying trust for a find-replace.
  • Prefer the Xtream door where your player supports it — you keep on-demand libraries, guide data and account info.
  • The URL contains your password. Treat it as a secret and never post it.

Want a player that speaks both doors? Download Tuneline — add your source as Xtream or as an M3U URL, free, with no bundled content.

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 from xtream code#xtream codes to m3u#convert m3u link to xtream code#xtream codes url#get m3u from xtream
Back to all posts