Subtitle Formats & Editing

How to Convert YouTube WebVTT (.vtt) to Clean Plain Text or SRT

Published 2026-12-01 · 7 min read · Verified against CleanTranscript browser formatters
Direct Answer

YouTube auto-generated .vtt files (especially from yt-dlp) use rolling paint-on cues filled with <00:00:01.240><c> tags and 2x-3x repeated lines—so naive converters or ffmpeg -i sub.vtt sub.srt leave duplicated text behind. If you have the YouTube URL, paste it into CleanTranscript to export deduplicated .srt or clean timestamp-free .txt in one click with zero CLI. For offline .vtt files already on disk, strip the WEBVTT header and <c> tags, collapse consecutive identical lines, and convert dot milliseconds (.) to SubRip commas (,).

RAW YOUTUBE ROLLING .VTTWEBVTT · Kind: captions00:00:01.000 --> 00:00:03.100align:start position:0%hello <00:00:01.400><c>world</c>00:00:03.100 --> 00:00:03.110hello world (10ms duplicate!)2x–3x bloated lines · dot ms4-STAGE VTT CLEANUP1. Drop WEBVTT & NOTE headers2. Strip <HH:MM:SS.mmm> & <c>3. Collapse duplicate rolling lines4. Merge 10ms frames & swap . → ,Preserves exact speech orderCLEAN OUTPUTClean .TXT (AI / Docs)Continuous paragraphs,0 duplicates, 0 timecodesValid .SRT (Editors)00:00:01,000 --> 00:00:03,110Sequential IDs · UTF-8WHY FFMPEG ALONE FAILS ON YOUTUBE AUTO-SUB .VTT FILESRunning ffmpeg -i subs.vtt subs.srt converts timestamp dots to commas, but keeps every rolling duplicate line and 10ms transition cue.Always deduplicate cues—or skip .vtt cleanup completely by pasting the YouTube link into CleanTranscript for instant .srt / .txt.
Four-stage cleanup pipeline that turns a bloated YouTube rolling WebVTT (.vtt) file into deduplicated plain text or strict SubRip (.srt).

Why YouTube .vtt Files Have Duplicate Lines & <c> Tags

When you run yt-dlp --write-auto-subs --skip-download or download a WebVTT caption file from YouTube, you are not getting simple subtitle blocks. YouTube's automatic speech recognition outputs paint-on (roll-up) WebVTT engineered for its web player, where words appear progressively on line 2 and then scroll up onto line 1 of the next cue.

Every raw YouTube auto-generated .vtt file contains five specific syntax artifacts that break offline video players (VLC, MPV), editing timelines, and AI prompts:

Raw YouTube .vtt Artifact Exact Byte-Level Example What Breaks If Left Uncleaned Exact Cleanup Rule
WebVTT Header & Metadata WEBVTT
Kind: captions
Language: en
Premiere Pro, DaVinci Resolve, and CapCut reject the file when renamed to .srt. Remove everything above the first cue timestamp line.
Cue Positioning Settings 00:00:01.000 --> 00:00:03.100 align:start position:0% Breaks strict SubRip parsers or prints positioning text into plain-text transcripts. Strip everything after the end timestamp on the timing line.
Inline Word-Timing <c> Tags fix<00:00:01.420><c> duplicate</c><00:00:01.810><c> lines</c> Renders literal angle-bracket code on screen and inflates LLM token usage by 35%–45%. Regex replace <[^>]+> with empty string and unescape HTML entities (&amp;, &nbsp;).
10ms Hold Transition Frames 00:00:03.100 --> 00:00:03.110 (0.010s duration) Causes flickering subtitles in VLC/Resolve and doubles cue count unnecessarily. Drop or merge zero-new-text transition cues lasting <50ms.
Rolling Line Duplication Line 2 of Cue N repeats verbatim as Line 1 of Cue N+1 (2x–3x repetition) Every sentence prints twice or three times in plain text and confuses ChatGPT/Claude summaries. Track the last emitted line and skip consecutive identical (or prefix-overlapping) lines.

Fastest Option (Zero CLI): Skip .vtt Cleanup Directly From the YouTube URL

If your goal is simply a clean plain-text transcript or editor-ready .srt from a public YouTube link, you do not need to download a rolling .vtt and write regex cleanup scripts at all:

  1. Open CleanTranscript YouTube to SRT (for video editors) or CleanTranscript YouTube to TXT (for ChatGPT, Claude, NotebookLM, or docs).
  2. Paste the YouTube URL (watch?v=, youtu.be, /shorts/, or /live/).
  3. Click SRT, VTT, TXT, or MD. CleanTranscript parses the underlying caption segments cleanly — zero <c> tags, zero repeated rolling lines, and strict UTF-8 comma milliseconds generated locally in your browser.

Comparing 4 Ways to Convert Local .vtt Files to .txt or .srt

Already have local .vtt files downloaded on macOS, Windows, or Linux? Not all converters handle YouTube's rolling format properly:

Conversion Method Strips <c> Tags? Removes Rolling Duplicates? Dot . → Comma , SRT? Best Use Case
Renaming .vtt to .srt No No No (fails import) Never recommended — rejected by Premiere, Resolve, and CapCut.
ffmpeg -i in.vtt out.srt Usually yes No (keeps 2x–3x repeats & 10ms cues) Yes Only reliable for clean manual creator VTTs, not YouTube auto-captions.
Local Python / CLI Deduplicator Yes Yes Yes Best for offline batches of yt-dlp .vtt files already on disk.
CleanTranscript Web Tool (From URL) Yes Yes Yes Fastest zero-login path when you have the public YouTube link.

Copy-Paste Python Script: Convert Any Rolling YouTube .vtt to Clean .txt

If you already downloaded local .vtt files with yt-dlp on Mac, Linux, or Windows, run this zero-dependency Python 3 script to strip headers, <c> tags, timestamps, and consecutive duplicate rolling lines in milliseconds:

# Save as vtt_to_txt.py and run: python3 vtt_to_txt.py captions.en.vtt > clean.txt
import html, re, sys

raw = open(sys.argv[1], encoding="utf-8").read()
lines, prev = [], ""
for line in raw.splitlines():
    s = line.strip()
    if not s or s.startswith(("WEBVTT", "Kind:", "Language:", "NOTE")) or "-->" in s:
        continue
    s = html.unescape(re.sub(r"<[^>]+>", "", s)).strip()
    if s and s != prev:
        lines.append(s)
        prev = s

print(" ".join(lines))

Pro Tip for yt-dlp Users: Avoid Rolling .vtt at Download Time

  • Request structured json3 or ttml instead: Passing --sub-format json3 or --sub-format ttml to yt-dlp fetches clean segment arrays instead of rolling paint-on WebVTT frames.
  • Prefer manual subtitles when present: Use --write-subs before falling back to --write-auto-subs. Manual creator tracks do not contain <c> paint-on tags or 10ms hold cues.
  • Need an open-source local CLI? CleanTranscript maintains a zero-dependency MIT CLI (cleantranscript-cli on npm) that cleans local subtitle tracks into .txt, .srt, and Obsidian Markdown.
  • Double-check SRT syntax before editing: See our exact SRT vs VTT syntax diff or our Premiere Pro and DaVinci Resolve & CapCut import checklists.
Need Clean WebVTT Too? If you are embedding captions in an HTML5 <video><track> player and want a valid, non-duplicated .vtt file without YouTube's paint-on bloat, export directly from CleanTranscript YouTube to VTT.

Frequently Asked Questions

Why does my YouTube .vtt file from yt-dlp have every line repeated two or three times?

YouTube auto-generated captions use a paint-on rolling WebVTT layout designed for its web player. Each cue repeats the previous bottom line on the top line while streaming new words wrapped in inline <00:00:01.240><c> tags, plus 10ms transition frames. Standard players and text converters read every block literally unless you deduplicate consecutive lines.

Does ffmpeg -i input.vtt output.srt fix duplicate lines in YouTube auto-captions?

No. FFmpeg translates the WebVTT dot milliseconds into SubRip commas and adds cue numbers, but it preserves every rolling duplicate line and 10ms transition frame from YouTube's auto-generated .vtt. You need a deduplicating parser—or a clean export directly from CleanTranscript—for editor-ready subtitles.

How do I convert a local .vtt file to a clean .txt transcript on Mac or Windows without installing apps?

Run the 12-line built-in Python 3 script in this guide (python3 vtt_to_txt.py file.vtt > clean.txt) to strip WEBVTT headers, timestamps, <c> tags, and duplicate lines locally—or if the video is public on YouTube, paste its URL into CleanTranscript's YouTube to TXT page for instant zero-login download.

What are the <00:00:01.420><c> tags inside a YouTube .vtt subtitle file?

Those are WebVTT cue timestamp and class tags used by YouTube to animate word-by-word karaoke-style highlighting during playback. Removing anything matching the regex <[^>]+> strips them cleanly without touching the spoken words.

Can I just rename a .vtt file extension to .srt for Premiere Pro, CapCut, or DaVinci Resolve?

No. WebVTT uses a mandatory WEBVTT file header, optional cue IDs, and period milliseconds (00:00:01.200), whereas strict SubRip (.srt) requires sequential numeric cue IDs and comma milliseconds (00:00:01,200). Simply renaming the extension triggers importer errors.

More CleanTranscript Guides