M3U Converter: CSV, JSON and Clean M3U — M3UPlaylist
Tool

M3U playlist converter

Convert a playlist to a spreadsheet or a script-friendly structure, or turn that structure back into a valid M3U. Column names, attribute mapping and duplicate handling are all explained below, and the conversion happens in your browser.

Convert a playlist

M3U or JSON in, CSV, JSON or M3U out

Formats

What each output is for

CSV is for people and spreadsheets. One row per channel, six columns: name, group, channel id, logo, duration and URL. It is the format to choose when you want to sort by group, paste a list into a document, or hand the channel data to someone who will never open a playlist file. Values containing commas, quotes or line breaks are quoted properly, so a channel name with a comma does not shift every column after it.

JSON is for scripts. It carries the same fields plus the complete attribute object, which matters when a playlist uses attributes beyond the three common ones — a catch-up window, a radio flag, a user agent requirement. Losing those in conversion is a common cause of a playlist that plays differently after a round trip.

Clean M3U is for going back. The output is rebuilt from parsed entries rather than copied, so attributes are re-quoted, the header is restored if it was missing, and duplicate URLs are dropped. If you have edited a CSV in a spreadsheet, this is not the path back — the M3U output expects M3U or JSON input, not CSV.

Round trips

Why a converted playlist can behave differently

A playlist is not only its channels. Between entries it can carry directives that change how a player treats them: an #EXTGRP line that sets the group for subsequent entries, an #EXTVLCOPT that sets a user agent or a referrer, a #KODIPROP that selects a stream type. A converter that only understands names and URLs silently drops them, and a stream that played before the conversion no longer does.

This converter keeps the directives it saw attached to the entry they followed and writes them back in the same position. What it cannot do is invent directives that were never in the source. If a playlist depends on a per-player option you removed in a spreadsheet, the round trip will not restore it: the export is a function of what was parsed.

If the file you opened is not a channel list at all — it is mostly #EXT-X- tags and entries that point at short segments — it is an HLS media playlist, and the conversion will produce a table with nothing meaningful in it. M3U vs M3U8 explains how to recognise one from the first few lines.

The practical test is to convert, export, and load the result in the player you actually use before replacing your working copy. Keep the original file until the converted one has played for a few minutes.

Related

Using the export

A CSV of a few thousand channels is easier to audit than the playlist itself: sort by group to see whether the groups mean anything, sort by URL host to see how many different servers the list depends on, and sort by name to spot the duplicates that differ only in punctuation. When you have decided what to change, edit the entries in the M3U editor and export from there, so the file keeps its structure.

To check the original before converting it, run it through the validator first — converting a broken file produces a tidy broken file. The duplicate guide covers the cases where two entries point at one stream and the URL is not identical.

Columns

The six columns, and what they leave out

The CSV output is fixed at six columns. Knowing which one is empty tells you what the playlist itself is missing:

The CSV columns and where each value comes from
ColumnTaken from
nameEverything after the comma that closes the attribute list
groupThe group-title attribute
tvg-idThe tvg-id attribute, used for EPG matching
tvg-logoThe image URL in tvg-logo
durationThe number before the attributes, usually -1
urlThe line beneath the entry

Anything outside those six fields — a catch-up window, a channel number, a per-player option — is not in the spreadsheet, because a spreadsheet has no room for a variable set of attributes. That is the honest limit of the CSV view, and the reason JSON exists here: it keeps the whole attribute object under attrs, so a round trip through JSON can return every key the file carried.

Values containing a comma, a double quote or a line break are wrapped in quotes, and their internal quotes are doubled, so a channel named News, World stays one cell instead of shifting every column after it. An empty cell means the field was missing or empty — CSV cannot tell those apart, which is the second reason the JSON output is the safer one to edit and convert back.

The format guide explains what each attribute does in a player, and the M3U vs M3U8 guide covers the case where the file you opened is a streaming manifest rather than a channel list.