OnlineTextLab
Esc

TXT to SRT Converter

You decide what each subtitle says by putting it on its own line.

or paste the text here

Options 5
How to split the text
Reading speed
Lines per subtitle

Runs on your device. Your files and text are not uploaded.

About TXT to SRT

Sometimes the words are finished and broken up exactly as you want them: a translated subtitle list, lines of a poem, on-screen text approved by a client, song lyrics. You do not want a tool rearranging them. You want each line to become one subtitle, in order, in a valid SRT file.

That is what this page does by default. Every non-empty line of your text file becomes one cue. Your breaks are respected, even when two sentences share a line or one sentence runs across two. Only a line too long to fit the limits is split.

If your text is really a flowing script and not a list of subtitles, choose Reflow to fit under Options, or use Create Subtitles, which has more choices for that kind of text.

How it works

The text is read line by line, blank lines are ignored, and repeated spaces within a line collapse to one. A line longer than your limits allow is split at sentence, clause or word boundaries. Otherwise it stays whole and gets one line break if it needs two lines on screen.

Numbers start at 1, and the time format follows the SRT convention exactly: 00:00:01,080, with a comma before the milliseconds. Each subtitle's time comes from its length at your reading speed, between 1 and 7 seconds, with an 80 millisecond gap. Enter a Video length to scale the whole set so it ends at that point. The result has no markup and no byte order mark.

How to use TXT to SRT

  1. Click Select TXT file, drop one on the page, or paste the lines into the box.
  2. Check the Subtitles count, which should match your number of lines.
  3. Open Options to set Reading speed, line limits, Video length, or to change How to split the text.
  4. Click Download SRT. The file takes your text file's name, so captions.txt becomes captions.srt.

Four approved lines of on-screen text

Input
Good evening, and thank you for coming.
This film was made over three winters.
Everything you are about to see is real.
No scenes were staged.
Output
1
00:00:00,000 --> 00:00:01,941
Good evening, and thank you for coming.

2
00:00:02,021 --> 00:00:03,903
This film was made over three winters.

3
00:00:03,983 --> 00:00:05,924
Everything you are about to see is real.

4
00:00:06,004 --> 00:00:07,122
No scenes were staged.

Four lines in, four cues out, with the wording unchanged. The last line is shorter, so it gets a shorter duration.

When it helps

  • Getting a translator's line-by-line subtitle list into a format a video editor can import.
  • Adding lyrics or poetry to a video, where line breaks are part of the piece.
  • Importing on-screen titles into a project as a subtitle track you can then retime.
  • Making an SRT skeleton from a shot list, so that an editor has one cue per shot to drag into place.

Tips for a better result

  • Use blank lines freely to keep your text file readable. They do not produce empty subtitles or add pauses.
  • Most video editors can shift a subtitle track, so import the file and adjust the first cue to see how far the rest of the set is from the picture.
  • If you need the line break inside a subtitle to fall somewhere specific, this tool chooses it for you when a line goes over the character limit. Keep lines under the limit to prevent that, and edit the result if needed.

Good to know

  • It knows nothing about your video, so times are estimates based on the number of characters and will need adjusting.
  • You cannot force a line break within a cue from the text file, since every new line starts a new subtitle.
  • Timestamps in your text are not recognized here and would show up as subtitle words. Use Transcript to SRT if your text has them.
  • It writes SRT only. For WebVTT, convert the result afterwards with SRT to VTT.

Questions people ask

Can I rename a .txt file to .srt instead?

That produces a file with the right name and the wrong contents. An SRT file needs a number and a timing line above each subtitle, and players will show nothing, or an error, without them. Adding those is the entire purpose of this page.

My long paragraph became several subtitles. Can I stop that?

It happened because the line would not fit your limits. Raise Characters per line, or allow two lines per subtitle, or break the paragraph yourself in the text file so each line is what you want on screen.

What encoding is the downloaded file?

It is UTF-8 with no byte order mark, which handles accents and non-Latin scripts. A few very old players want a mark at the start of the file to recognize UTF-8; a text editor can add one if yours shows garbled characters.

What to use next

Last reviewed . Read our editorial policy.