Skip to main content
SubtitleMatrix

TXT to SRT

Format conversionPlain text transcript
Or paste subtitle text

Options

Used when the source has no end times (plain text, LRC). The timeline in the output is generated here rather than converted, so this number is what you get.

What this conversion changes

1 thing is dropped or needs a decision

  • Timing

    the timeline itself — the source records no timings, so the output's is generated rather than converted

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 turns a plain text file into a subtitle file by giving each line a time slot. Nothing in a text file says when its words appear, so the timeline has to be built: the first line starts at zero, and every line after it starts where the previous one ended. Each line becomes one cue.

How long each line stays on screen is yours to set. The duration field below the file box takes milliseconds and its value is printed there rather than hidden, because it decides the shape of everything you get back — two seconds a line turns a page of dialogue into a few minutes of subtitles, and the last cue ends at the number of lines multiplied by that duration.

Blank lines are paragraph breaks in the text, not empty cues, so a file written in paragraphs converts without gaps. When you are ready to line the result up against a video, the shift and retime tools will move the whole timeline at once. As always, the file is read and written in your browser.

Examples

A typical TXT file, converted to SRT

Input

The quick brown fox jumps over the lazy dog.

Second paragraph, first line.
Second paragraph, second line.

Output

1
00:00:00,000 --> 00:00:02,000
The quick brown fox jumps over the lazy dog.

2
00:00:02,000 --> 00:00:04,000
Second paragraph, first line.

3
00:00:04,000 --> 00:00:06,000
Second paragraph, second line.

Dropped in this output: timing. Everything else matches line for line.

The same conversion on an awkward input

Input


Hello world.

Second block.

Output

1
00:00:00,000 --> 00:00:02,000
Hello world.

2
00:00:02,000 --> 00:00:04,000
Second block.

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

Where do the timings come from?

They are generated, because the input has none. Line one starts at zero, each line gets the duration you set, and the next line starts where the last one ended. The report above says the timing was generated and keeps saying it even after you set a duration — the duration decides how long each cue runs, not whether the timeline came from your file.

Can I change how long each line lasts?

Yes. The duration field takes a number of milliseconds and applies to every cue in the file: 1000 for one second a line, 3000 for three. The value is shown next to the field so you can check the timeline you get against the one you wanted.

What counts as a cue boundary?

A line break. Each non-empty line becomes one cue, in the order it appears, and blank lines are treated as paragraph breaks rather than as cues of their own.

Do I get an empty cue where the blank lines were?

No. Blank lines never become cues, so the timeline has no gaps that came from formatting. If you want a pause, either use a longer duration or shift the cues after it.

Can I subtitle a video from this?

It gives you a starting timeline rather than a finished one: the generated cues begin at the start of the video and run forward in even steps. If you have real start times, converting from CSV or LRC will put them in place directly, which saves retiming every cue by hand.

Related tools