Wrap Subtitles to a Line Length
Or paste subtitle text
Options
One box, five choices, and each choice has a page of its own. Wrap re-flows every cue to the column count, which can shorten a line that was too long as easily as it can pull a short line back up. Split long lines breaks only the lines that are over the count and leaves the rest exactly as they were. Balance keeps the number of lines each cue already has and moves the words between them until the longest line is as short as it can be. Join puts each cue onto a single line. Limit leaves alone every cue that is already within the line count. This page fills the box in with the choice its title names and lists no other.
Counted in columns rather than characters, so a Chinese or Japanese character takes two of them and an accented Latin letter takes one. 42 is the usual figure for Latin-script subtitles. Lower it and the lines come out shorter but more numerous; nothing is ever cut off.
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 re-flows the text of every cue to a line length you choose. A line that is over the length is broken at a word boundary; a line that is under it is pulled back up into the line above when the two of them fit together. It is the one page in this group that does both, which is why it is the one to reach for when a file's line breaks have drifted rather than when a single line is too long.
The length is counted in columns, not characters. A Chinese or Japanese character takes two columns and a Latin letter takes one, so a limit of 42 holds twenty-one Chinese characters or forty-two Latin ones. Forty-two is the figure Latin-script subtitles have used for decades and it is the default here. Nothing is ever cut off to meet the number: the page moves line breaks and leaves the words alone, so a line that cannot be brought inside the limit by any break is reported instead.
A line that begins with a dash marks a change of speaker. Those lines are walls. The page re-flows the words on either side of one, but it will not merge two of them into a single line, because putting two people's dialogue on one line is a reading error the dashes were written to prevent. If dissolving that wall is what you want, the page that removes line breaks does exactly that and counts how many it dissolved.
Everything happens in your browser. No file is uploaded and no account is needed. All eleven formats that carry more than one line inside a cue are accepted: SRT, WebVTT, ASS, SSA, SBV, SAMI, LRC, MicroDVD, TTML, JSON and CSV. Plain text is not offered, because a text file is one cue per line by definition and there is no break inside a cue for this page to move.
Examples
One cue broken too early and one broken too late
Input
1
00:00:01,000 --> 00:00:04,000
We could take the train
and be there by six
2
00:00:05,000 --> 00:00:09,000
I told you we would miss the last train if we stayed any longer
Output
1
00:00:01,000 --> 00:00:04,000
We could take the train and be there by
six
2
00:00:05,000 --> 00:00:09,000
I told you we would miss the last train if
we stayed any longer
Two opposite faults in one file, both repaired at the default length of 42 columns. The first cue arrived as lines of 23 and 19 columns, which together are 43 — one column over the limit — so the page joins them and immediately breaks again a word earlier, leaving 39 and 3. The second was written as a single 63-column line and comes out as 42 and 20. Nothing was added or dropped in either cue: the words are the same and only the breaks between them moved. The three-column tail on the first cue is the honest cost of packing lines greedily rather than splitting them evenly.
A Chinese line, where one character is two columns
Input
WEBVTT
00:00:01.000 --> 00:00:04.000
你好世界今天天气很好我们出去玩吧顺便买点东西回来
Output
WEBVTT
00:00:01.000 --> 00:00:04.000
你好世界今天天气很好我们出去玩吧顺便买点东
西回来
Twenty-four Chinese characters are forty-eight columns, so this line is over the limit and breaks after the twenty-first of them. A tool counting characters would have called twenty-four a short line and left it alone, which is how a two-line Chinese subtitle ends up twice as wide as the two-line English one beside it. There are no spaces in the text to break at, so each character is its own break point and the break lands mid-sentence, which is where a Chinese subtitle is expected to break anyway.
Two speakers, two lines
Input
1
00:00:01,000 --> 00:00:04,000
- Then we walk
- All the way home
Output
1
00:00:01,000 --> 00:00:04,000
- Then we walk
- All the way home
The file comes back byte for byte, and that is the correct result rather than a failure. The two lines are 14 and 18 columns and would fit together on one line of 32, but each begins with a dash, which means a different person is speaking. Merging them would hand one actor the other's words. Neither line is over the limit on its own, so there is nothing else to do, and a run with nothing to report reports nothing.
Frequently asked questions
How does wrapping decide where a subtitle line breaks?
The words of the cue are laid out one after another and a break goes in before the first word that would push the line past the column count. That is a greedy fit, not an even split: the first line is filled as far as it will go and whatever is left goes on the next one. The result is that lines are packed rather than balanced, which is what you want when the goal is to fit a cue into as few lines as possible. If your file already has the right number of lines and you want them to look even, the page that balances line breaks does that instead.
Why was my short second line joined onto the first one?
Because together they fit inside the limit. Wrapping treats the whole cue as one run of text and lays it out again from scratch, so a break that the file had in it is not preserved just because it was there. This is the difference between this page and the one that breaks only the long lines: that page leaves every line that is already short exactly where it is, and this one may pull it up. If the break was deliberate, it needs a dash or the other page rather than this one.
Are line lengths in wrap counted as characters or as columns?
As columns, which is what a subtitle line is actually measured in. A Latin letter, a digit and a space each take one column; a Chinese or Japanese character, a Korean syllable and an emoji take two. So a limit of 42 accepts forty-two Latin characters or twenty-one Chinese ones, and the two lines come out the same width on screen. Counting characters instead would give every Chinese subtitle a line twice as long as its English counterpart at the same setting.
Why were my two dash lines not merged into one line when wrapping?
Because a dash at the start of a line means a change of speaker, and merging two of those lines would put two people's dialogue on one line. The page treats such lines as blocks that cannot be crossed, so it re-flows the words inside each block and leaves the blocks in place. The lines in the example above are short enough to fit together and still stay apart for this reason. If you do want them joined, the page that removes line breaks joins them and reports how many speaker breaks it dissolved.
What happens to a word that is longer than the subtitle line length?
It gets a line to itself and stays longer than the limit, and the run reports one line still over the limit. There is no break inside a single word that would not also change the word, and changing your text is not what a line-length setting is for. German compounds and long URLs are the usual cases. If you need such a line brought under the count, the break has to go inside the word and that is an edit you make deliberately rather than one the tool makes for you.
Which subtitle formats can be wrapped to a line length?
The eleven that can hold more than one line inside a cue: SRT, WebVTT, ASS, SSA, SBV, SAMI, LRC, MicroDVD, TTML, JSON and CSV. Plain text is the one format left out, and the reason is that a text file is one cue per line by definition, so there is no break inside a cue for this page to move and the output would be identical to the input. Nothing about the file is uploaded at any point, and the format is read from the content rather than from the file name.