How to Convert a TXT File to SRT

How to Convert a TXT File to SRT
Image Credit: mikkelwilliam/iStock/GettyImages

As the availability of ultra-HD smartphone recordings and at-home editing software suites continues to increase, film production and distribution are rapidly democratizing. The barrier to entry for aspiring filmmakers is lower than ever, and that means do-it-yourself content producers often need to get hands-on with the minutiae of movie distribution, including providing subtitles and closed captions for their films. Even if you're an Instagram influencer or YouTube content creator, having those subtitles increases your video's reach and accessibility.

Digital distribution and streaming platforms like Amazon Prime Video and Netflix all have their own requirements for closed captioning and subtitling, but one thing's almost certain – you're going to have to deliver subtitles if you want your content distributed, and that's where SRT files often come in to play. Even if your captions didn't start in the SRT format, turn to old-school methods or automatic SRT converter options to get your file types up to snuff.

About TXT and SRT

Before you can convert a TXT to an SRT file, you need to know what each of these file type extensions is. An SRT file is a SubRip subtitle file, which is named for the free and open-source SubRip software. SRT files are compatible with a wide variety of video player software. In addition to plain text, SRT files contain crucial captioning information, including the start and stop times for subtitle text, ensuring that the text appears on screen at just the right moment in your video. Video players as common as those found on YouTube and Facebook, among many others, support the SRT file type for displaying subtitles.

TXT files contain simple, unformatted text. Although this widely compatible text file type boasts a tiny file size, it does not contain subtitle information unless you put it there. You can use programs such as Microsoft Notepad, Microsoft Word, Apple TextEdit and others to open, view and edit TXT files.

Editing the TXT File

Here's a little good news for creators in need of SRT captions: If you have the software to create a TXT file, chances are you can also create an SRT file. You may be able to edit your existing TXT file by hand and save it in the SRT format. You just need to hop in and add plenty of properly formatted captioning info first. Whether you're creating your subtitles from scratch or editing an existing TXT file, here's how to do it:

  1. On the first line, type a number to identify the subtitle's section. Each section is something you'd consider an individual subtitle, such as a single line of dialogue or closed caption description for a sound.
  2. On the next line, type the time within the video that you first want the subtitle to appear and then type --> and the time you want the subtitle to disappear. This is the timestamp. Timestamp formatting should look like this: [hours]: [minutes]: [seconds], [milliseconds], without the brackets.
  3. The next line contains the actual caption.
  4. Double-space and repeat the process for the next subtitle section and each section after that.

Example of Edited TXT File

For example, the formatted text should look a little like this:

00:00:01,50 --> 00:00:05,00
Hey! You're not allowed in there!

00:00:05,07 --> 00:00:11,53
That's what you think. There have been some big changes since last time you saw me, John. I run the show now.

00:00:11,61 --> 00:00:15,00
What the hell are you talking about?

This process works with simple text-editing software such as Microsoft Notepad and TextEdit on Mac platforms. If the option is available, choose plain text from the text editor's formatting menu. After you have all the subtitles and timestamps ready to go, choose File and then Save and save the document with a .**SRT** extension. It should now be compatible with any video creation or video playback software that supports the SRT format and acceptable for delivery if you have a distributor requesting SRT subtitles for your film.

More Subtitle Formats

As you delve into the world of converting subtitle files from one format to another – whether you're coding by hand, using an online converter or opting for the software route – you will inevitably come across formats well outside of SRT and TXT types. Let's take a look at some of the most common types of subtitle files as a quick primer before you get lost in the jargon.

  • CAP (.asc, .cap): Developed by Cheetah International, this one works a lot like SMPTE-TT files (see below), but because it supports all kinds of different characters outside of the Roman alphabet, it's mostly commonly used for international television broadcasts.
  • CPT.XML (.cpt): You won't come across this caption file format too terribly often. Captionate XML is for use with Captionate software (shocker) and Adobe Flash.
  • DFXP (.dfxp): Though not as popular as it was in its heyday, the Distribution Format Exchange Profile was developed for use in Adobe Flash video captions. You'll often find it employed in these Flash players, as well as lecture software and video management systems like Flowplayer, Kaltura, Limelight, Panopto and YouTube.
  • EBU.STL (.stl): You're most likely to come across this format on the other side of the pond, or if you're dealing with PAL-region software. These European Broadcasting Union subtitles are commonly used in European TV broadcasts, but they also pop up in the Avid video editing suite.
  • PPT.XML (.pptx): If that "PPT" bit is ringing a bell, that bell is probably ringing true. Yes, a PPT.XML file is a PowerPoint XML, a Timed Text Markup Language (TTML) that's made for PowerPoint 2010 and earlier, but it also works on presentation software such as Lectora.
  • SAMI (.sami, .smi): The Synchronized Accessible Media Interchange format comes straight from the developers at Microsoft. Though it's also compatible with YouTube, SAMI (also known as SMI) was made specifically for Windows Media Player software.
  • SBV (.sbv): You'll find this subtitle file type on YouTube. YouTube's Automatic Timing feature automatically creates captions based on video transcripts – those captions appear as SBV files.
  • SMPTE-TT (.smpte): The Society of Motion Picture and Television Engineering developed this Timed Text format (hence the acronym), which is widely used as the closed captioning format for U.S. television broadcasts. That's probably because SMPTE-TT is fully compliant with the closed caption regulations set forth by the United States Federal Communications Commission. While most other subtitle and caption formats appear based on time attributes, SMPTE-TT files appear based on specific video frames.
  • SRT (.srt): Native to SubRip and SubViewer software, this file type has transcended its legacy software to become a near-universal industry standard for caption and subtitle files.
  • STL (.stl): Spruce Subtitle Files come from (wait for it) Spruce Technologies, the makers of DVD Studio Pro software. Though you can customize individual subtitle traits of a Spruce Subtitle File just like an SRT, this format is only compatible with DVD Studio Pro.
  • SUB (.sub): Like SRT, this is another file type native to SubViewer.
  • QT (.qt): You might've guessed this one already. That's right – it's a QuickTime file. This type of subtitle is used exclusively for Apple's QuickTime software, including QuickTime Pro.
  • TTML (.ttml): Though the format is very slightly different, Timed Text Markup Language files are generally interchangeable with Distribution Format Exchange Profile (DFXP) files.
  • WebVTT (.vtt): Similar to the SRT format, this file type comes from the Web Hypertext Application Technology Group (WHATWG). While it shares many traits with SRT (such as the ability to change line numbers, text and timelines via by-hand formatting), think of VTT as SRT evolved. This one adds all-new abilities such as custom positioning and rendering options. Video players at Vimeo, MediaCare, YouTube and others makes use of WebVTT.

Online SRT Converters

While converting TXT to SRT by hand in your word processing software is the most straightforward way to make the change, you can also use online SRT converters to get the job done. Because you need the timestamps and proper formatting in place in your TXT document, these converters may be redundant if you're able to export your TXT file as an SRT. However, if you have trouble saving in the SRT format or have a different file format that you need to convert to a SubRip file, these services can come in handy. Take a look at a few examples:

  • GoTranscript Subtitle Converter: Free to use at, this tool allows you to upload your TXT file or another common text or subtitle file format and convert it to a variety of subtitle formats, including SRT, QuickTime text (QT), Netflix Timed Text (a type of DFXP file), YouTube subtitles (in the SBV format), Advanced SubStation Alpha files (ASS) or Flash XML subtitles (XML), among others. With the formats on offer, you're able to convert more than just TXT files – knock yourself out and convert ASS to SRT if you'd like. GoTranscript also provides closed captioning and subtitling services from scratch at rates ranging from $1.04 to $7.50 per minute of video, as of 2019. The created subtitles are available in a range of formats, including SRT.
  • ToolSlick TXT to SRT Converter: ToolSlick's free-to-use TXT to SRT Converter option is less robust and more straightforward than GoTranscript's offering. Doing exactly the job it advertises, the TXT to SRT Converter has a blank field that you paste the contents of your TXT document into and then press the Convert button to produce an SRT file. If the TXT document does not contain timestamps, ToolSlick has an option to introduce estimated timestamps into the text, basing the estimate on the length and character count of each line.
  • Free Subtitle Converter: Offered for free online use by the webtool makers at Rest7, the aptly named Free Subtitle Converter uses a simple drag-and-drop interface. Drag the TXT or another file type into the big white space, choose the type of file you want to output and then download the file. What sets the Free Subtitle Converter apart is its compatibility with support for more than 45 subtitle and caption file types. That means you can do a whole lot more than convert TXT to SRT, SMI to SRT, or SSA to SUB. You can find this one at

The Software Option

If converting files among different types of subtitle formats is something you do often, it may be worth your time to download a free, lightweight conversion software program to your computer. That way, you can work even when your Wi-Fi goes down.

SubC is free and small enough to fit on a USB flash drive, where you can load it right away without worrying about installing it. This Windows program works with file types commonly used in programs such as SubRip (SRT), MicroDVD (which uses SUB files), SubStation Alpha and SubViewer, which also uses SUB files.

For Mac users, Subtitle Converter, which retails on the Mac App Store for $1.99, might fit the bill. This streamlined software supports the conversion of subtitle file formats including ASS, SSA (another SubStation Alpha format), SMI, SUB and others to the SRT format.