Skip to main content
SubtitleMatrix

Merge Two Subtitles Into One

Text and stylingMerge two tracks into one bilingual file
Or paste subtitle text
Or paste the second file's text

Options

Two subtitles rarely agree cue for cue, and this is the choice that decides what happens everywhere they disagree. Anywhere a cue in one file overlaps a cue in the other, the two are treated as the same moment and carried together, with the overlap deciding how long the result stays on screen. The rest is this choice. Keeping both files adds every unmatched cue as a line of its own, so not one word from either input is missing — and the second file's timing is not preserved, because an unmatched cue still has to sit somewhere on the first file's timeline. Keeping the first file's timeline does the opposite: the first file's cues keep exactly the starts and ends they came in with, nothing new is inserted, and any cue in the second file that lines up with nothing is dropped. The report after a run always names how many cues that was.

Once two cues are treated as the same moment, their text has to share the screen. Arranged as two lines is how bilingual subtitles are normally broadcast and how most players expect to see them: the first file's line sits above the second file's, and the cue becomes a two-line cue. That needs the cue to allow a line break, which is why every format that stores a cue as a single line is left out of this page entirely rather than quietly flattened here. Joined into one line puts both languages on a single line separated by whatever you type in the field below, which is what you want when the readers are meant to see the translation first and the original as an aside — a translator's subtitle rather than a bilingual broadcast one.

Which frame rate the timings are counted in. On the format pages this is what MicroDVD needs, because it stores timing as frame numbers. On the frame rate pages it is the rate the file was timed against — the version the subtitles were made for — and the page's second box takes the rate of the video you are going to use them with. 23.976, 24, 25, 29.97, 30, 50, 59.94 and 60 are the common ones. Getting it wrong shifts the whole timeline, and on the frame rate pages it shifts it by a ratio rather than by a fixed amount.

This page takes two subtitle files and gives you one. Put the original in the first box and the translation in the second, and every cue in one file that shares screen time with a cue in the other becomes a single cue holding both texts — the original on the first line, the translation on the second. That is the file a bilingual broadcast needs: one track, one file, one thing to load, instead of two tracks that a player will happily let the viewer turn off or that a DVD authoring tool will refuse.

The pairing is by time, not by position. Two files with the same number of cues could be matched line by line, but the number of cues is exactly what differs between an original and a translation: a translator will split one long English line into two shorter Chinese ones, or merge two questions into one. So a cue is paired with a cue when their time ranges overlap, and only then. Cues that overlap nothing are the interesting case, and the first option decides what happens to them. Keeping both files carries each one over as a cue of its own, so not a word from either input is missing — the price is that the result is no longer anybody's exact timeline, because an unmatched cue still has to sit somewhere. Keeping the first file's timeline does the opposite: the first file's cues come out with exactly the starts and ends they went in with, nothing is inserted between them, and any cue in the second file that lines up with nothing is dropped, with the count written into the report after the run.

The second option is how the two texts share the screen. Two lines is how bilingual subtitles are normally broadcast and how most players expect to see them: the first file's line above the second file's. One line runs them together with whatever you type as the separator — a spaced slash, a spaced dash, a pipe, or nothing at all, which is the convention for a pair like Chinese and Japanese. Two lines needs the format to allow a line break inside a cue, and the formats that store a cue as a single line are left out of this page rather than quietly flattened on it.

Every format here is read the same way: SRT, WebVTT, ASS, SSA, SBV, SAMI, TTML, JSON and CSV. MicroDVD is not, because its cue is a single line of frames; LRC is not, because it stores no end time and pairing is nothing but end times; plain text is not, because it has neither. If the two files are in different formats that is fine — each box is read as whatever it holds. Nothing is uploaded: both files are read, merged and written again inside this browser tab, which is the reason this page exists at all for anyone working with material that cannot leave their machine. Both boxes accept more than one file, and the first file in one box is paired with the first file in the other, so a whole season can go through in one run.

Examples

Two files that line up, merged as two lines

Input

First file:
1
00:00:01,000 --> 00:00:03,000
Good morning.

2
00:00:05,000 --> 00:00:07,000
How are you?


Second file:
1
00:00:01,000 --> 00:00:03,000
早上好。

2
00:00:05,000 --> 00:00:07,000
你好吗?

Output

1
00:00:01,000 --> 00:00:03,000
Good morning.
早上好。

2
00:00:05,000 --> 00:00:07,000
How are you?
你好吗?

Both cues are paired because their times overlap exactly, and each pair comes out as a two-line cue with the first file's line on top. Nothing is lost and nothing moved, so the report after a run says so. The cue numbers are the first file's own, which is what you get whenever every cue in the output came from that file — an unmatched cue from the second file is what changes that, as the third example shows.

The same two files, joined on one line

Input

First file:
1
00:00:01,000 --> 00:00:03,000
Good morning.

2
00:00:05,000 --> 00:00:07,000
How are you?


Second file:
1
00:00:01,000 --> 00:00:03,000
早上好。

2
00:00:05,000 --> 00:00:07,000
你好吗?

Output

1
00:00:01,000 --> 00:00:03,000
Good morning. / 早上好。

2
00:00:05,000 --> 00:00:07,000
How are you? / 你好吗?

Same pairing, same times, arranged on one line with a spaced slash between the languages. The line is longer than either input's, so on a page that caps characters per line this file may now be reported as over the limit — that is a real consequence of the layout, not a rounding error. Leaving the separator empty instead is the other real choice: the two texts then run straight into each other, which is how Chinese and Japanese are normally set together.

A cue in the second file that matches nothing

Input

First file:
1
00:00:01,000 --> 00:00:03,000
Good morning.

2
00:00:05,000 --> 00:00:07,000
How are you?


Second file:
1
00:00:01,000 --> 00:00:03,000
早上好。

2
00:00:03,000 --> 00:00:04,500
(敲门声)

Output

1
00:00:01,000 --> 00:00:03,000
Good morning.
早上好。

2
00:00:03,000 --> 00:00:04,500
(敲门声)

3
00:00:05,000 --> 00:00:07,000
How are you?

The second Chinese cue starts at exactly the instant the first English cue ends, and starting when the previous one ends is not the same moment — it is two subtitles, not one. So it is carried over as a cue of its own, at its own time, in the middle of the file. Because a cue that did not come from the first file is now in the output, the whole file is renumbered from 1 and the first file's own numbering is not kept.

Frequently asked questions

The two files have different numbers of cues. Which one wins?

Neither, and that is the point of matching by time. A cue from one file is paired with a cue from the other when their time ranges overlap, whatever their numbers are, so a translation that splits one long line into two shorter ones still comes out attached to the line it belongs to. The first of the two split cues is the one that pairs; the second overlaps nothing and is then either carried over as a cue of its own or dropped, depending on the first option. The report after a run tells you which of those happened and how many cues it affected.

Will merging a translation change the timing of my original?

Not if you keep the first file's timeline. On that setting every cue in the first file comes out with exactly the start and end it went in with, and nothing is inserted between them, so the file you already timed and checked is still the file you have. The cost is on the other side of the ledger: a cue in the second file that overlaps nothing has nowhere to sit on that timeline, so it is dropped and counted in the report. If instead you keep both files, no text is dropped, but paired cues run from the earlier start to the later end, which can widen a cue by a few hundred milliseconds and push it under the next one.

Can I use this to add subtitles in a second language, or only to merge two files?

Both boxes accept any format this site reads, so a subtitle file plus a transcript-style file that has been converted to SRT works as well as two subtitle files. What the page needs from the second input is a timeline: the pairing rule is nothing but overlapping time ranges. A file with no times at all cannot be merged, which is why plain text is not accepted here — a text file would need a timeline invented for it first, and an invented timeline is a decision you should make deliberately rather than have a tool make for you.

Do I have to upload both files to a server?

No, and there is no server to upload them to. Both files are read in this browser tab, merged in memory and written back out here; closing the tab loses everything and nothing was ever sent anywhere. This matters most for exactly the material that gets subtitled: unreleased cuts, internal training video, legal and medical recordings, anything under an embargo. The usual alternative is a site that asks you to upload the file first, which for those users is not an option at all.

What if the two files are in different subtitle formats?

That works, and it is common: a WebVTT file from a webinar and an SRT from a translator. Each box is read as whatever it holds, and the output is written in the first file's format, which is why the two boxes are labelled. The consequence to know about is styling — if the first file is ASS with styled cues and the second is plain SRT, the merged file is ASS, and the second file's text joins it carrying the first file's styling rather than its own, with the count of affected cues listed in the report.

Which language ends up on the top line?

Whichever file you put in the first box, so the two-line arrangement is under your control rather than alphabetical or automatic. That matters more than it sounds in a bilingual broadcast: the convention is usually the original on top and the translation underneath, but a language-learning subtitle often puts the language being learned on top so the eye lands on it first. Swap the two files between the boxes and the lines swap.

Related tools