Converter tool

Subtitle Converter

Convert subtitles between SRT, WebVTT, SBV and plain text. Timings are kept, malformed cues are reported, and the conversion runs in your browser.

Pasted text. Up to 5 MB.

Preview

Output Preview

Paste or upload subtitles and press Convert to see the result here.

Subtitle Converter

Operator: Abdulla Al Fahad. How tools are built and checked

Subtitle Converter rewrites a caption file from one timing format into another: SubRip (.srt), WebVTT (.vtt), YouTube's SBV (.sbv), or a plain transcript with the timings removed. Load a file or paste the cues, check the format it detected, pick the output and download the new file.

The usual reason to need it is a player that only reads one format. The HTML <track> element accepts WebVTT, so an .srt delivered by a translator has to become a .vtt before it plays on a website, and a caption file downloaded from YouTube Studio as .sbv has to become .srt before most desktop editors will import it. Cues whose timing cannot be trusted are listed by number rather than quietly written into the output.

Key features

  • SRT, WebVTT and SBV in, SRT, WebVTT, SBV or plain text out
  • Format detected from the content, with a manual override
  • SRT output renumbered from 1 in file order
  • WebVTT NOTE, STYLE and REGION blocks skipped when reading
  • WebVTT cue identifiers and position settings kept for WebVTT to WebVTT
  • Optional removal of <i>, <b>, <u>, <font>, <c.class> and <v> tags
  • Malformed cues counted, listed by number with the reason, and left out
  • Upload, drop or paste; the file is converted on the page

What changes between SRT, WebVTT or SBV and SRT, WebVTT, SBV or plain text

SRT is a sequence of numbered blocks: a counter line, a timing line such as 00:00:01,000 --> 00:00:03,500 with a comma before the milliseconds, then one or more lines of text, with a blank line between cues. WebVTT starts with the word WEBVTT, uses a dot before the milliseconds, allows a name or number above the timing line as a cue identifier, allows the hours to be left out (01:15.200), and may contain NOTE comments, STYLE blocks and REGION definitions. SBV puts both times on one line separated by a comma, with unpadded hours: 0:00:01.000,0:00:03.500.

Detection looks at the content, not the file extension. Text that begins with WEBVTT is WebVTT; otherwise a timing line with a comma before the milliseconds means SRT, and a start,end line means SBV. Arrow timings that use dots but have no WEBVTT header are read as SRT, since the SRT reader accepts either separator. The detected format is shown in the Input format menu, and you can choose another if the guess is wrong.

Timestamps are read leniently: one or two digits for minutes and seconds, a comma or a dot, and one to three fraction digits, where fewer than three are read as a decimal fraction, so 00:00:01,5 means one and a half seconds. Output is always written strictly: SRT as 00:00:01,500, WebVTT as 00:00:01.500 with the hours included, SBV as 0:00:01.500. Files can be up to 5 MB, are read as UTF-8 unless they start with a UTF-16 byte-order mark, and are written as UTF-8.

How it works

The text is split into blocks at blank lines. In SRT, a block that starts with a number takes that number as its cue number and expects the timing line straight after it. In WebVTT, the header block is dropped, NOTE, STYLE and REGION blocks are skipped, and a block whose first line has no arrow treats that line as the cue identifier. In SBV, the first line of each block is the timing line.

Each timing line is then checked. A cue is malformed when its timing line does not parse (a missing arrow, letters in a timestamp, 75 seconds), when its end time is the same as or earlier than its start time, or when a block has no timing line at all. Malformed cues are not written. The result shows how many there were and lists the first five with their cue number: the SRT counter when the file has one, otherwise the cue's position in the file.

When a WebVTT file is read, the entities &amp;, &lt; and &gt; become the characters they stand for, &nbsp; becomes a non-breaking space, and &lrm; and &rlm; become the invisible left-to-right and right-to-left marks. When WebVTT is the output, every & is written as &amp;, every < that does not open a tag is written as &lt;, and --> inside cue text is written as --&gt;, so "Fish & chips" plays correctly in every format. Tags are left as they are unless you tick Strip formatting tags.

Common use cases

  • Turning a translator's .srt into a .vtt for an HTML5 <video> element on a course or product page.
  • Converting captions exported from YouTube Studio as .sbv into .srt for a video editor's caption track.
  • Making a plain-text transcript from a subtitle file to quote in show notes or an article, with tags stripped.
  • Checking a subtitle file for broken timings before delivery: the malformed-cue report lists them even when you convert to the same format.
  • Cleaning <font color> tags out of an old fan-made .srt so a smart TV stops printing them on screen.

How to use this tool

  1. Press Upload file and choose an .srt, .vtt, .sbv or .txt file, drop one onto the box, or paste the subtitles.
  2. Check the Input format menu. It shows the detected format; choose another if it is wrong.
  3. Pick the output in Convert to: SRT, WebVTT, SBV or Plain text.
  4. Tick Strip formatting tags if the target player shows tags as literal text.
  5. Press Convert and read the cue count and any malformed-cue report.
  6. Press Download to save the file, which keeps your original file name with the new extension.

Example

episode-04.srt, with a typo in the second cue's end time

1
00:00:02,500 --> 00:00:05,000
<i>Previously on the show...</i>

2
00:00:05,200 --> 00:00:04,900
We need to talk.

3
00:00:06,000 --> 00:00:08,250
Fish & chips
for two, please.

Converted to WebVTT (episode-04.vtt)

WEBVTT

00:00:02.500 --> 00:00:05.000
<i>Previously on the show...</i>

00:00:06.000 --> 00:00:08.250
Fish &amp; chips
for two, please.

Report: 2 cues written. 1 malformed cue was found and is not in the output.
Cue 2: the end time is not after the start time (00:00:05,200 --> 00:00:04,900)

Tips for best results

  • You can convert SRT to SRT. It renumbers the cues from 1, drops malformed ones and lists them, which is a quick way to tidy a file whose counters were broken by hand edits.
  • WebVTT voice tags such as <v Narrator> mean nothing in SRT and many players print them. Tick Strip formatting tags when converting a WebVTT file that uses them.
  • For a transcript, choose Plain text and tick Strip formatting tags. Each cue becomes one paragraph, and a cue that spans two lines keeps its line break.
  • If the menu says no timing lines were found, look at the first cue. A file that uses a period instead of a colon between the minutes and seconds, or a different arrow such as ->, is not one of the three formats.

Edge cases to watch

Timings are copied, not changed. The converter does not shift subtitles, change frame rates or fix overlapping cues; two cues that overlap in the source overlap in the output too.

WebVTT positioning (line:, position:, align:) and cue identifiers are only kept when the output is also WebVTT. SRT and SBV have no place for them, so a caption placed at the top of the screen in WebVTT drops back to the player's default position.

A blank line ends a cue in all three formats, so a cue that contains an empty line is read as two blocks. The second block has no timing line and is reported as malformed. When writing, empty lines inside cue text are removed for the same reason, and a cue left with no text at all is skipped and counted in the result.

Entity text is not preserved across the WebVTT boundary. An SRT cue that literally contains &amp; is written to WebVTT as &amp;amp;, which a WebVTT player shows as &amp;, but a cue in a WebVTT file that contains &amp; or &nbsp; becomes & or a non-breaking space in SRT, SBV and plain text output, because those formats have no entities.

ASS/SSA, TTML, SCC and other formats are not read. Override codes in curly braces, such as {\an8}, are removed when you strip tags, but no other ASS styling is converted.

Common errors and how to fix them

"is not a subtitle file" when picking a file.
Only .srt, .vtt, .sbv and .txt files are accepted. For other caption formats, export SRT or WebVTT from the program that made them first.
Every cue is reported with "the timing line does not parse".
The wrong input format is selected, often SBV chosen for an SRT file. Set Input format back to the detected option, or to the format the file really uses.
Accented or non-Latin characters come out as � symbols.
The source file is in a legacy encoding such as Windows-1252, but files are read as UTF-8. Open it in a text editor, save it as UTF-8 and load it again.
The output has fewer cues than the source.
Read the report above the preview. It counts malformed cues and cues that were empty after tag stripping; both are left out of the file.

Best practices

  • Play the converted file against the video once, at least the first and last minute, before publishing it. A file can be valid and still be offset from the picture.
  • Fix malformed cues in the source and convert again rather than editing the output, so the source stays the master copy.
  • Keep tags for WebVTT and SRT output if the target player supports italics, which most do for <i>; strip them for plain text and for players that show them literally.

What happens to formatting tags

With Strip formatting tags off, tags are kept as written, and only the WebVTT entity handling described above changes the text. That means <i> and <b> carry over to every format, which is usually what you want, because SRT and WebVTT players both understand them, but it also means WebVTT class tags like <c.yellow> end up in an SRT file.

With it on, the converter removes <i>, <b>, <u>, <s>, <font ...>, <c> with any class, <v> voice tags, <lang>, <ruby>, <rt>, <span>, WebVTT karaoke timestamps such as <00:00:04.200>, and curly-brace override codes. A less-than sign that is not part of one of these tags, as in "I <3 this", is not removed; SRT, SBV and plain text keep it as it is, and WebVTT output writes it as &lt;3, which players show as <3.

Frequently asked questions

Why does the WebVTT output have no cue numbers when the SRT had them?

SRT counters are not cue identifiers. WebVTT does not need anything above the timing line, so the counters are dropped. If you convert WebVTT to WebVTT, any identifiers in the source are kept.

Can I convert a .txt file?

Yes, as long as its content is SRT, WebVTT or SBV. Subtitle files are sometimes saved with a .txt extension, and the format is detected from the text, not the name. A transcript without timings cannot be turned into subtitles, because there are no times to write.

What happens to a cue that ends at the same moment it starts?

It is treated as malformed, because a cue with no duration is never shown. It is listed in the report with its number and left out of the output.