Skip to main content
SubtitleMatrix

CSV to SMI

Or paste subtitle text

What this conversion changes

Nothing is lost in this direction — every feature of the source format has somewhere to go in the target format.

This list comes from the capability matrix for these two formats, not from the particular file you loaded. A specific file may lose more if it uses features the format allows but the matrix does not model.

This page converts CSV to SMI. Drop a file in — or paste the text — and you get the SMI version back. The conversion runs entirely in your browser, so nothing is uploaded and no account is needed.

Nothing is lost in this direction. Every feature CSV can express has an equivalent in SMI, so the output is the same subtitles in a different wrapper — the timeline, the line breaks and the text all survive. That holds for any CSV file, including one that uses every feature the format allows.

One file is fine, and so is a whole season: the queue works through them in order and the results come down together as a single ZIP.

Examples

A typical CSV file, converted to SMI

Input

start,end,text
00:00:01.000,00:00:03.500,The quick brown fox.
00:00:04.000,00:00:06.250,"Jumps over, the lazy dog."
00:00:07.000,00:00:09.000,"Two lines here.
And a second one."

Output

<SAMI>
<HEAD>
<STYLE TYPE="text/css">
<!--
P { text-align: center; font-family: Arial, sans-serif; }
-->
</STYLE>
</HEAD>
<BODY>
<SYNC Start=1000>
<P>The quick brown fox.
<SYNC Start=3500>
<P>&nbsp;
<SYNC Start=4000>
<P>Jumps over, the lazy dog.
<SYNC Start=6250>
<P>&nbsp;
<SYNC Start=7000>
<P>Two lines here.<br>And a second one.
<SYNC Start=9000>
<P>&nbsp;
</BODY>
</SAMI>

Nothing is dropped here: compare the two sides line for line.

The same conversion on an awkward input

Input

id,start,end,note,text
1,00:00:01,000,00:00:04,000,cue one,"Hello there, friend."
2,00:00:05.000,00:00:07.000,cue two,Second line.
bad,notatime,00:00:09.000,cue three,Unreadable start.
4,00:00:10.000,00:00:09.000,cue four,End before start.
5,00:00:12.000,00:00:14.000,cue five,Unquoted comma in text, right here.

Output

<SAMI>
<HEAD>
<STYLE TYPE="text/css">
<!--
P { text-align: center; font-family: Arial, sans-serif; }
-->
</STYLE>
</HEAD>
<BODY>
<SYNC Start=1000>
<P>Hello there, friend.
<SYNC Start=4000>
<P>&nbsp;
<SYNC Start=5000>
<P>Second line.
<SYNC Start=7000>
<P>&nbsp;
<SYNC Start=10000>
<P>End before start.
<SYNC Start=10001>
<P>&nbsp;
<SYNC Start=12000>
<P>Unquoted comma in text, right here.
<SYNC Start=14000>
<P>&nbsp;
</BODY>
</SAMI>

This is the kind of damage real files have — mixed line endings, stray whitespace, fields left empty. Compare it with the tidy example above to see what the parser forgives.

Frequently asked questions

What does the output look like when CSV becomes SMI?

Like SMI: no cue numbers and no timecode line: every cue is a `<SYNC Start=…>` tag with its text in a `<P>` under it, and — because a SYNC replaces whatever was on screen — a `<P>&nbsp;` block just after it that puts the screen back to empty. Every CSV cue becomes one SMI cue, in the same order, with the same text.

Are the CSV timings exact in the SMI file?

Yes, to the millisecond — which is as fine as either format goes. CSV writes a moment as `00:00:04.126` and SMI writes the same moment as `Start=4126`; nothing is rounded or shifted between the two, and a cue that was on screen for 2.9 seconds still is.

How does a two-line CSV cue come out in SMI?

As two lines with a `<br>` between them, which is how SAMI writes a hard line break. The pairing survives — the two CSV lines still belong to one subtitle in the SMI output, and a player shows them together.

Do CSV cues keep their order in the SMI output?

Yes, and they are sorted by start time on the way — earliest first, which is how every format here expects them and how players read them. If your CSV file listed its cues out of sequence, the SMI output puts them back in order; that is a change to the file's structure rather than its content, and it is deliberate.

Can I convert the SMI back to CSV?

Yes, and that is the lossy direction: styling, positioning and format-specific content have nowhere to go in CSV. This way round nothing is lost, so that cost only appears if you go back.

Does the SMI output keep the CSV file's encoding?

No — the output is UTF-8, with Unix line endings and no byte-order mark, whatever the CSV file used. A file that arrives in UTF-16, or in a Windows single-byte encoding, is decoded on the way in (the result panel says so when that happens); what comes out is always the same UTF-8 SMI.

Related tools