UK IPTV Technical • Updated April 2026

M3U Playlist & Xtream Codes Explained — A Plain-English UK IPTV Guide

If you’ve spent any time researching IPTV apps you’ve probably seen the terms “M3U“, “M3U8” and “Xtream Codes” thrown around without explanation. They’re three of the most misunderstood pieces of IPTV jargon. This post explains what each one actually is, how legitimate services like Plex Live TV use them, what the security risks are when you paste an unknown M3U URL into an app, and how to test a playlist’s validity before trusting it.

The honest summary

An M3U file is just a plain-text list of channel URLs and names. M3U8 is the same idea but UTF-8 encoded and used inside HLS streaming. Xtream Codes is an API standard for IPTV apps to pull a channel list and authenticate. None of these are illegal by themselves — they are open standards. The legality depends entirely on what content the URLs in the playlist point to.

Skip the tech, see UK providers →
Read the legal explainer

M3U playlist Xtream Codes UK — hero image

What is an M3U file? #

The M3U format dates from 1995 and was originally designed for the Winamp media player. The acronym comes from “Moving Picture Experts Group Audio Layer 3 Uniform Resource Locator” — a long way of saying “an MP3 playlist”. The format survived the death of Winamp because of one quality: it is the simplest possible playlist format. A plain text file, one URL per line, optionally with a comment line above each URL describing the stream.

A minimal M3U file looks like this:

M3U playlist Xtream Codes UK — illustration 1
#EXTM3U
#EXTINF:-1 tvg-name="BBC One HD" tvg-logo="https://example.com/bbc1.png" group-title="UK",BBC One HD
https://example.com/streams/bbc1/master.m3u8
#EXTINF:-1 tvg-name="ITV1 HD" tvg-logo="https://example.com/itv1.png" group-title="UK",ITV1 HD
https://example.com/streams/itv1/master.m3u8

Three components per channel: an #EXTINF metadata line (duration, name, logo URL, group), the visible channel name after the comma, and the actual stream URL on the next line. An IPTV app reads the file top-to-bottom, builds a programme-guide-style channel list, and plays whichever stream you click.

That is the entire format. There is no DRM, no authentication, no encryption inside the file itself — those happen at the URL level, where the actual stream lives.

M3U vs M3U8: what’s the difference? #

M3U8 is M3U encoded as UTF-8. The “8” at the end refers to the byte width of the character set. The practical difference: M3U8 reliably handles non-ASCII characters in channel names — accents, Cyrillic, Chinese, emoji — without breaking. Plain M3U often mangles them.

The bigger reason you see M3U8 today is that Apple’s HLS (HTTP Live Streaming) standard, used by virtually every modern streaming service including Sky Stream, NOW and BBC iPlayer, packages its manifest files as M3U8. So when you see master.m3u8 at the end of a video URL, that’s a manifest file — a tiny text file that tells the player which video chunks to download next.

So in a typical IPTV setup, both kinds of M3U are at work simultaneously: an outer M3U playlist of channels (often called a playlist M3U), each of which points at an inner M3U8 manifest (the streaming manifest the player actually consumes). Most users never need to know the difference, but it explains why some apps accept “M3U URL” and “HLS URL” as if they were synonymous.

Xtream Codes API: a smarter playlist #

Xtream Codes is the brand name of an IPTV middleware platform that achieved widespread adoption in the late 2010s. The platform itself was shut down by Italian authorities in 2019 following piracy investigations, but its API standard had become so widely supported that legitimate IPTV apps still implement it.

The Xtream Codes API differs from a plain M3U in three ways:

  • Authentication. Instead of a single URL containing everything, Xtream Codes splits credentials into a server URL, a username and a password. The app sends these to the server and receives a JSON channel list in return.
  • Dynamic updates. Channel additions and removals on the server side appear automatically in the app. A static M3U file would need to be re-downloaded.
  • EPG integration. The API can return an electronic programme guide — the seven-day schedule that sits behind a TV-style channel grid.

An Xtream Codes login typically looks like: Server URL http://example.com:8080, Username youraccount, Password yourpass. The IPTV app handles the rest.

Plenty of legitimate apps support the Xtream Codes API including IPTV Smarters, TiviMate and Perfect Player. The API itself is open and content-neutral. As with M3U files, the legal status depends on what the server is actually delivering.

How IPTV apps consume M3U and Xtream Codes #

From the app’s point of view the workflow is identical regardless of source:

  1. Acquire the channel list. Either by reading a local M3U file, downloading a remote M3U URL, or calling the Xtream Codes API.
  2. Build an EPG. Either by parsing tvg-id attributes in the M3U file and pulling a separate XMLTV programme guide, or by trusting the Xtream Codes API’s built-in guide.
  3. Cache the channel logos. From the tvg-logo URLs in the playlist.
  4. Render the channel grid. Group channels by the group-title attribute (UK Sport, UK News, Kids, etc.) and let the user navigate.
  5. On click, hand the stream URL to the video player. The player handles HLS, MPEG-TS, MP4 or whatever format the URL serves. If the URL requires authentication, the player passes along the Xtream credentials.

This explains why two IPTV apps using the same playlist can look completely different — the playlist tells them what to play, but each app decides how to display it. TiviMate is famously polished; some open-source alternatives are not.

M3U playlist Xtream Codes UK — illustration 2

Legitimate uses of M3U in the UK #

The major UK services (Sky Stream, NOW, Virgin TV Stream, EE TV, Freely) do not give you an M3U URL. Their apps are closed clients with built-in DRM. M3U lives on the open-source side of the IPTV ecosystem. There are real, fully legal uses though.

Plex Live TV with HDHomeRun #

Plex Live TV reads channels from a Silicondust HDHomeRun network tuner. The HDHomeRun receives an aerial Freeview signal and exposes the tuned channels as M3U URLs over your local network. Plex consumes that M3U, builds a programme guide, and serves it to every Plex client in the house. 100% legal — you own the aerial, the signal is free-to-air, the tuner is hardware you bought.

BBC iPlayer M3U exports #

The BBC publishes a public radio M3U directory at bbc.co.uk/sounds for radio streams (subject to UK licence terms). Some hobbyist projects ingest these into their own dashboards. Again, fully legal — the BBC publishes the URLs.

Self-hosted media servers #

If you have a personal collection of legally-acquired video, an M3U playlist is the simplest way to expose them across devices. Tools like Jellyfin, Emby and Plex all support M3U input.

Stalker / Ministra portals (corporate IPTV) #

Hotels, hospitals, cruise ships and corporate offices often run their own IPTV systems serving licensed content within the building. These typically expose an M3U or Xtream Codes endpoint that internal devices read. Fully legitimate.

Sample M3U file — annotated #

Here is a minimal but realistic M3U file showing the metadata fields IPTV apps actually use:

#EXTM3U url-tvg="https://example.com/epg.xml.gz" refresh="3600"
#EXTINF:-1 tvg-id="bbcone.uk" tvg-name="BBC One HD" tvg-logo="https://example.com/logos/bbc1.png" group-title="UK Free",BBC One HD
https://example.com/streams/bbc1/playlist.m3u8
#EXTINF:-1 tvg-id="itv1.uk" tvg-name="ITV1 HD" tvg-logo="https://example.com/logos/itv1.png" group-title="UK Free",ITV1 HD
https://example.com/streams/itv1/playlist.m3u8
#EXTINF:-1 tvg-id="ch4.uk" tvg-name="Channel 4 HD" tvg-logo="https://example.com/logos/ch4.png" group-title="UK Free",Channel 4 HD
https://example.com/streams/ch4/playlist.m3u8

Field by field:

M3U playlist Xtream Codes UK — illustration 3
  • #EXTM3U — file header, mandatory.
  • url-tvg — URL of the matching XMLTV electronic programme guide.
  • refresh="3600" — tells the app to re-download the playlist hourly.
  • tvg-id — unique identifier matching the EPG file’s channel id.
  • tvg-name — display name (some apps prefer this to the visible name after the comma).
  • tvg-logo — logo PNG URL.
  • group-title — used by apps to build the genre filter sidebar.
  • The visible name (after the comma) is what shows in the channel grid.

Security: never paste a stranger’s M3U URL #

This is the single most important section of this post. M3U URLs are routinely shared on Reddit, Telegram, forums and “free IPTV list” websites. Pasting any of them into an IPTV app on your home network is a real security risk.

Risks of an untrusted M3U URL #

  • Tracker pixels and IP logging. Every channel logo URL and every stream URL gets a request from your home IP. The owner of that domain logs your IP, ISP, approximate location and the times you watched.
  • Malware in companion apps. “Free IPTV” sites often bundle the M3U URL with a “recommended player APK” — these APKs have repeatedly been found to ship credential-stealing malware. The BBC’s tech reporting and Which? have both covered cases.
  • Phishing redirects. Some streams display HTML5 overlays that mimic Sky or BBC login screens. The credentials are harvested.
  • Unlicensed content. The single biggest risk: most free shared M3Us point at unlicensed re-streamed content. Watching them creates the same legal exposure as a paid-but-unlicensed IPTV service.
  • Network exposure. Some IPTV apps request local-network permissions to discover devices. A malicious M3U combined with a malicious app can probe your router.

Safer practices if you must use M3U #

  • Only consume M3U URLs from organisations you can verify (BBC, your own HDHomeRun, your own self-hosted Jellyfin).
  • Run the IPTV app in a separate user profile or sandboxed Firestick.
  • Block the M3U app from the local network in your router’s parental-controls panel — it only needs internet, not LAN access.
  • Never enter Sky, BBC, Netflix or banking credentials inside an IPTV app’s overlay.

If your goal is “free UK live TV” the legitimate answer is Freely on a 2024+ Hisense or BMR Smart TV, or BBC iPlayer + ITVX + Channel 4 + My5 individually on any Smart TV. Both are 100% free, 100% licensed, and require zero M3U fiddling.

How to test if an M3U URL is valid #

If you receive an M3U URL from a trusted source (your own HDHomeRun, your own Plex server, a corporate hotel system) and want to verify it works, here are the safe diagnostic steps:

  1. Open the URL in a browser. A valid M3U returns plain text starting with #EXTM3U. If the browser tries to download a binary, the URL is wrong or the server is misconfigured.
  2. Look for stream URLs. Scroll past the #EXTINF lines. The actual stream URLs should be HTTPS, on a domain you recognise, and end in .m3u8 or .ts.
  3. Test a single stream. Copy one of the stream URLs into VLC (Media → Open Network Stream). If it plays, the playlist is functional.
  4. Check the EPG URL. The header should reference an XMLTV file (url-tvg). Open it — it should be valid XML, not a 404.
  5. Validate the channel count. A legitimate UK Freeview M3U has 50-80 channels. Anything claiming 18,000 channels is almost certainly an unlicensed re-streamer aggregating other countries’ content.

VLC is the gold-standard troubleshooting tool because it tells you the exact codec, bitrate, resolution and HLS variant for any URL. If a stream “doesn’t play in my IPTV app”, trying it in VLC quickly confirms whether the source is broken or the app’s player implementation is.

M3U vs M3U8 — what the 8 means #

You will see both file extensions. They are not separate formats — they are a character encoding choice, and if you mix them up your player either chokes or shows the channel names with garbage where the accents should be.

  • .m3u — the original 1996 Winamp format. Latin-1 (ISO-8859-1) encoded. Fine for ASCII-only channel names.
  • .m3u8 — the same syntax, encoded as UTF-8. The “8” is literally the number 8 in UTF-8. This is the modern default and the only one that handles “Sky Sports — Première League” or “Channel 4 +1” correctly.

Apple’s HLS specification actually requires .m3u8, which is why every modern streaming app uses it. The Wikipedia M3U entry traces the history. If you receive a playlist as .m3u and the names look broken, just rename it to .m3u8 and the player will usually re-decode.

Xtream Codes API explained #

Xtream Codes is the closest thing the IPTV world has to a standard API. It was originally a commercial panel for IPTV operators (the company itself was raided in 2019), but the URL structure became a de facto interface that every major IPTV player still supports.

An Xtream Codes endpoint takes three pieces of information:

  1. Server URL — e.g. http://example.com:8080
  2. Username
  3. Password

From those, the player auto-discovers four data feeds:

  • Live channel list (with categories)
  • VOD library
  • Series / TV-show library
  • EPG (electronic programme guide) for the next 7 days

The advantage over a flat M3U file is that the player can navigate categories, fetch the EPG separately and resume where you left off in a TV series. The disadvantage is that your password is stored on the device in plain text — if a player is poorly written, the credentials are visible in logs. IPTV Smarters Pro and Tivimate both encrypt the credential store; many free players do not.

How EPG data attaches to a playlist #

An M3U playlist on its own gives you channel names and stream URLs. The Electronic Programme Guide — what is on now and next — comes from a separate file in XMLTV format. The two are stitched together at runtime.

The link is the tvg-id attribute in the M3U:

#EXTINF:-1 tvg-id="bbcone.uk" tvg-name="BBC One" tvg-logo="https://i.imgur.com/x.png" group-title="UK | Entertainment",BBC One HD
http://example.com/stream/bbcone

The XMLTV file then contains <channel id="bbcone.uk"> with the schedule. Most UK Xtream Codes operators bundle the XMLTV automatically; for a flat M3U you have to provide the EPG URL separately in the player settings.

Open-source XMLTV sources for free UK channels include BBC iPlayer’s public schedule feed and the EPG export embedded in ITVX. They cover BBC and ITV networks but not Sky or paid channels.

Common M3U errors and what causes each #

Error message What is happening Fix
“Invalid playlist format” Missing #EXTM3U first line, or BOM byte at the start Open in Notepad++, save as UTF-8 without BOM
“Could not connect to server” Server URL is HTTP and your player blocks cleartext Switch to HTTPS endpoint; some players need ATS exception
“401 Unauthorized” Username or password expired Re-issue from the operator panel; check for trailing whitespace
“403 Forbidden” IP geo-block triggered, or device limit reached Sign out other devices; do not VPN to a foreign country
“All channels show black screen” Server is up but the streams are dead — usually a take-down Switch provider; do not “fix” with a different player
Channel names show as ????? File is M3U (Latin-1) but contains UTF-8 Rename to .m3u8 and re-import

How to safely host your own M3U file #

There are legitimate reasons to host an M3U yourself — community broadcasters, school internal feeds, point-of-sale signage. If you are doing this with a properly licensed source, here is how to do it without exposing the file to the public internet.

  1. Use HTTPS only. Free Cloudflare or Let’s Encrypt certificate. HTTP M3U over Wi-Fi can be intercepted by anyone on the network.
  2. Add a token in the URL. e.g. https://lan.example.org/playlist.m3u8?token=8f3a... — rotate the token monthly.
  3. IP-restrict. If the playlist is for a single household, allow-list your home WAN IP only.
  4. Set a Content-Disposition header so it downloads rather than appearing in browser caches.
  5. Disable directory listing on the host.
  6. Don’t share the URL on Reddit, Discord or Telegram. Once it is on a search engine, it is gone.

The legal line, restated

Hosting your own licensed source on an M3U is fine. Hosting someone else’s content without permission — even for “personal use only” — is copyright infringement under the Copyright, Designs and Patents Act 1988. The M3U file format is neutral; what you put in it is not.

How M3U fits into a wider UK IPTV setup #

Most readers arrive at this page because their reseller emailed them an M3U URL. If that is you, three resources will save you time. Our UK IPTV setup walkthrough covers paste-and-play in IPTV Smarters and Tivimate. Our What is IPTV beginner guide explains why an M3U URL behaves differently from a Sky Stream login. And our UK IPTV providers comparison shows the licensed alternatives — none of which use M3U because they don’t need to.

Why licensed UK services don’t expose M3U #

You’ll occasionally see forum posts asking “what’s the M3U URL for Sky Stream?” The answer is: there isn’t one, and there won’t be. Licensed services use closed clients with DRM (PlayReady, Widevine, FairPlay) for two reasons:

  • Rights agreements require it. Studios and the Premier League contractually require DRM on UK streams. Open M3U URLs are incompatible with that.
  • It limits sharing. A closed app prevents one subscription serving an entire WhatsApp group’s streaming devices.

This is why the only IPTV apps that show “Add M3U URL” in their settings are open-source players (TiviMate, IPTV Smarters, VLC, Kodi). They’re general-purpose tools — they can play your HDHomeRun’s M3U just as easily as a pirated one. The tool is neutral; what you point it at is what matters.

Frequently asked questions #

What is an M3U file in IPTV?

A plain-text playlist file listing channel URLs, names, logos and groupings. IPTV apps read M3U files to build their channel grid. The format is open and neutral — what makes a specific M3U legal or illegal is the content the URLs point to.

What’s the difference between M3U and M3U8?

M3U8 is M3U encoded in UTF-8. M3U8 is also the file extension Apple’s HLS streaming standard uses for its manifest files. In practice, IPTV apps treat them identically.

What is Xtream Codes?

An IPTV API standard that lets apps pull a channel list, authenticate with username/password, and load an EPG. It’s more dynamic than a static M3U file. The Xtream Codes company itself was shut down in 2019, but the API spec lived on as an open standard.

Can I use M3U with Sky Stream or NOW?

No. Licensed UK services use closed apps with DRM. M3U is for open-source players (VLC, Kodi, TiviMate) reading your own legal sources, like a Plex server or HDHomeRun tuner.

Is sharing an M3U file illegal?

Sharing the M3U format itself is not illegal. Sharing M3U URLs that point to unlicensed re-streamed content is copyright infringement under UK law. The act of distribution is more legally exposed than the act of viewing.

How do I know if an M3U URL is legitimate?

Check the source. If it’s your own HDHomeRun or BBC’s published radio directory, it’s legitimate. If it came from a Telegram channel, Reddit thread or ‘free IPTV’ site, it’s almost certainly pointing at unlicensed content and should not be added to your network.

What’s the safest IPTV app for M3U?

VLC for one-off testing. TiviMate for a polished day-to-day experience with legitimate sources. Plex Live TV if you have an HDHomeRun. Avoid sketchy APKs distributed outside the official app stores.

Why does my M3U playlist work in VLC but not in my IPTV app?

Usually because the app’s bundled player doesn’t support a specific codec or HLS variant the M3U uses. VLC’s player is more permissive than most IPTV-app-built-in players. Switching the app to use an external player (often labelled ‘ExoPlayer’ or ‘VLC backend’) usually fixes it.

Can I make my own M3U file?

Yes — it’s just a text file. Open Notepad, write ‘#EXTM3U’ on line one, then add #EXTINF lines and stream URLs alternately. Save as ‘mylist.m3u’. Open in VLC. That’s it.

Are ‘free IPTV M3U’ websites safe to use?

No. The vast majority point at unlicensed re-streamed content and many bundle malicious APKs alongside the playlist. We strongly recommend licensed UK services — see our IPTV providers comparison.

Can I open an M3U file in VLC?

Yes — VLC has supported M3U since 2002. Drag the file into the VLC window or use Media → Open Network Stream and paste the URL. VLC handles both M3U and M3U8 transparently.

Why does my M3U list keep dying?

Three usual causes: the upstream source got blocked by an ISP court order, the reseller’s server expired, or your token was revoked. None of these have a fix from your end. Licensed UK services like Sky Stream, NOW and Freely don’t use M3U precisely because the format has no built-in authentication renewal.

Is there a UK-legal M3U I can use?

Strictly speaking, no widely-distributed one. The free-to-air UK channels (BBC, ITV, Channel 4, Channel 5) are licensed for broadcast and on-demand via iPlayer / ITVX / Channel 4 / My5 — not via third-party M3U redistribution. Use the official apps, or use Freely for live TV without an aerial.

The takeaway #

M3U and Xtream Codes are open, neutral standards. They have legitimate uses (Plex Live TV, HDHomeRun, BBC radio, corporate IPTV). They are also the technical backbone of the unlicensed re-streaming market — which is why pasting random M3U URLs from forums into your home network is a bad idea.

If you want UK live TV that just works, skip the M3U fiddling. The five licensed services on our comparison page will be running in under ten minutes with no playlists involved. For the legal context, read Is IPTV legal in the UK?. For privacy considerations on top of any IPTV setup, see our IPTV VPN guide.

See our 2026 UK IPTV comparison →