Skip to main content
SubtitleMatrix

Remove Line Breaks from Subtitles

Text and stylingRewrap lines
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.

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 puts every cue onto a single line. Where a cue had two lines, or three, the text is joined into one run with a single space standing where each break was, and the cue keeps its start, its end and its number. The file still has the same number of subtitles in the same order; only the breaks inside them are gone.

It is the page to reach for when a file was broken for a screen much narrower than the one you are going to show it on, or when the breaks landed in the middle of a phrase and you would rather have the whole sentence in one run. If you want the text broken somewhere else instead of joined, the wrapping page re-flows cues to a column count and this page is the opposite of it: this one always ends with exactly one line per cue, whatever its length turns out to be.

A line that begins with a dash marks a change of speaker, and every other page in this group treats those lines as walls it will not cross. This page crosses them, and the reason is in its name: the break between two speakers is a line break, and removing line breaks is what you asked for. What it does not do is keep quiet about it. The run reports how many speaker breaks it joined, so a file where three people were speaking in turn is not left looking like one person said all of it without anything in the report to say so.

Two smaller decisions are worth knowing about. When the text on both sides of a break is Chinese, Japanese or Korean, no space is inserted, because those scripts are not written with word spaces and a space there would show up as a hole in the middle of the sentence. And an empty line — a cue that holds a blank line between two pieces of text — contributes nothing to the join, so it does not leave a double space behind. Everything runs in your browser, nothing is uploaded, and the eleven formats whose cues can hold more than one line are accepted: SRT, WebVTT, ASS, SSA, SBV, SAMI, LRC, MicroDVD, TTML, JSON and CSV.

Examples

A two line cue and a one line cue

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:08,000
A single line

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:08,000
A single line

The first cue comes out as one 43-column line with a single space where the break was, and the second cue was already on one line so there was nothing to do to it. Both keep their numbers and their timings, and the blank line between the two blocks is part of the SRT layout rather than part of a cue, so it comes back as it was. Nothing about the timeline moved: the joined cue is on screen for exactly the same span it was.

Three speakers on three 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 two dash lines are joined into one, dashes and all, so the turn markers are still in the text where they were. The run reports one speaker break joined, which is the honest description of what happened: the file no longer shows on screen that two people spoke, and nothing in the output reveals that except the dashes themselves. This is the one page in the group that will do this, and it only does it because its title asks for exactly that.

A blank line, and a Chinese cue

Input

[Script Info]
Title: join

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.00,0:00:04.00,Default,,0,0,0,,Hello\N\Nworld
Dialogue: 0,0:00:06.00,0:00:09.00,Default,,0,0,0,,你好世界\N再见朋友

Output

[Script Info]
Title: join

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.00,0:00:04.00,Default,,0,0,0,,Hello world
Dialogue: 0,0:00:06.00,0:00:09.00,Default,,0,0,0,,你好世界再见朋友

The first cue holds a blank line between its two words — `\N\N` is how ASS writes one — and the join produces `Hello world` with one space rather than two, because the empty line added no text and its space would have shown up as a double gap. The second cue is Chinese, and its two halves come back with nothing between them at all: inserting a space would put a visible gap in the middle of the sentence. The blank line itself is dropped, which is the one thing this page removes rather than moves.

Frequently asked questions

How is removing line breaks different from wrapping subtitles?

Removing joins everything, so every cue ends up with exactly one line no matter how long that line is. Wrapping works to a column count and will produce as many lines as the text needs to stay within it, which may well be two or three. One page ends with one line per cue, the other ends with lines no wider than the number you set. If the width is what matters to you, wrap; if it is the single line, remove.

Why is there no space where two Chinese lines were joined?

Because Chinese, Japanese and Korean are not written with word spaces, and a space inserted between two halves of a sentence would be visible to the reader as a gap. The page looks at the character on each side of the break: when both are from those scripts it joins them directly, and otherwise it puts a single space in. Mixed text such as a Chinese name followed by an English line still gets the space, since that is where a space belongs.

What happens to the dashes when joined lines mark a speaker change?

They stay in the text, and the join is counted and reported. A line beginning with a dash means someone else is speaking, so joining it to the line above means the on-screen signal that two people spoke is gone — the dashes remain, but they are no longer at the start of a line. The run reports how many speaker breaks were joined so that this is something you were told rather than something you have to notice.

Does removing line breaks change how many subtitles the file has?

No. The page works inside each cue and never joins two cues together, so a cue that held two lines and a cue that held one both come out as one cue each, with their own timings and their own numbers. Joining two cues into one is a different operation with a different result on the timeline, and it lives on the page that merges subtitle cues rather than here.

What happened to the empty line inside one of my cues?

It was dropped, because it had no text to contribute and keeping its space would have left the joined line with a double gap in the middle of it. An empty line inside a cue is usually a leftover from an edit rather than something a viewer is meant to see, so nothing is lost by removing it. If a cue was empty from end to end, with no text at all, it comes back as an empty cue rather than being deleted.

Which subtitle formats can have their line breaks removed?

The eleven whose cues can hold more than one line: SRT, WebVTT, ASS, SSA, SBV, SAMI, LRC, MicroDVD, TTML, JSON and CSV. Plain text is not among them, and for once that is not a limitation — a text file is one cue per line already, so there is nothing to join and the run would return the file unchanged. Styling that spans a break is kept on the joined line rather than dropped, while karaoke timing that spans one is dropped and counted.

Related tools