How to Download a YouTube Transcript (TXT, SRT, JSON)
Three ways to download a YouTube transcript: a free online tool, the API, or copy-paste from YouTube's built-in panel. Plus when to use TXT vs SRT vs JSON.
TL;DR: YouTube doesn’t expose a download button for the transcript panel, but the captions are public data. Paste the URL into the TubeAlfred Transcript Generator and click Download — TXT, SRT, or JSON. For batch processing or code, hit the API. The format you want depends on what you’re doing with the file (TXT for reading, SRT for subtitles, JSON for code).
YouTube shows you the transcript. They just don’t let you save it. This post covers every download method and which file format to pick.
Why YouTube Doesn’t Have a Download Button
The “Show transcript” panel inside YouTube’s video player has timestamps, scrolls along with the video, and even lets you click a line to jump to that moment. What it doesn’t have is a Copy or Download button.
The accepted theory is that YouTube wants to keep both the content and the user on YouTube. A download button would let viewers grab a video’s text and consume the content elsewhere.
This isn’t a copyright lock. The caption tracks are public data, accessible to any browser. Every download tool — including ours — pulls from the same caption files YouTube serves to your video player. Downloading them is allowed and doesn’t violate YouTube’s terms.
Method 1: Download via a Free Online Tool
Fastest path for any single video.
- Copy the YouTube URL
- Paste it into the TubeAlfred YouTube Transcript Generator
- Hit Get Transcript
- Click Download and pick your format: TXT, SRT, or JSON
The downloaded file is named after the video ID by default (you can rename it after download). The TXT version is clean text with paragraph breaks. The SRT version is subtitle-formatted with proper timecodes. The JSON version preserves segment-level structure for code.
No signup. Works on any public video. Mobile-friendly.
Method 2: Download via the API
For batch downloads or programmatic workflows.
curl https://api.tubealfred.com/v1/youtube/video/VIDEO_ID/transcript \
-H "Authorization: Bearer ta_live_xxx" \
-o transcript.json
That returns structured JSON. To convert to TXT in one pipe:
curl -s https://api.tubealfred.com/v1/youtube/video/VIDEO_ID/transcript \
-H "Authorization: Bearer ta_live_xxx" \
| jq -r '.data.transcript_only_text' > transcript.txt
To convert to SRT, use the segment-level data with timecodes. Sample Python:
import requests, os
API_KEY = os.environ["TUBEALFRED_API_KEY"]
video_id = "VIDEO_ID"
resp = requests.get(
f"https://api.tubealfred.com/v1/youtube/video/{video_id}/transcript",
headers={"Authorization": f"Bearer {API_KEY}"},
)
segments = resp.json()["data"]["transcript"]
def srt_time(ms):
h = ms // 3_600_000
m = (ms // 60_000) % 60
s = (ms // 1_000) % 60
ms_rem = ms % 1000
return f"{h:02d}:{m:02d}:{s:02d},{ms_rem:03d}"
with open("transcript.srt", "w") as f:
for i, seg in enumerate(segments, start=1):
f.write(f"{i}\n{srt_time(seg['start_ms'])} --> {srt_time(seg['end_ms'])}\n{seg['text']}\n\n")
For a full developer walkthrough see the YouTube Transcript API guide.
Method 3: Copy from YouTube’s Transcript Panel
This is the manual fallback when you can’t use a tool. It works for short videos but breaks down past about ten minutes of content.
- Open the video on desktop YouTube
- Click the three-dot menu, then Show transcript
- Optional — click the menu inside the transcript panel and toggle Toggle timestamps off
- Click anywhere in the transcript panel
- Press
Ctrl+A(Windows) orCmd+A(Mac) to select all - Press
Ctrl+CorCmd+Cto copy - Paste into a text editor and save as
.txt
Drawbacks: the selection often grabs extra UI text, timestamps don’t strip cleanly even with the toggle off, and very long videos can hang the browser when you try to select-all. For anything serious, use Method 1.
Which File Format Should You Download?
Pick based on what happens to the file next.
TXT — Clean Text
Plain text, paragraph breaks, no timestamps. Use this for:
- Reading the transcript yourself
- Pasting into a doc, blog post, or LLM prompt
- Search across many transcripts in a folder
- Re-purposing video content into written form
SRT — Subtitle Format
SRT is the standard subtitle format. Each block has a number, a start–end timecode, and the caption text.
1
00:00:18,800 --> 00:00:23,500
We're no strangers to love
2
00:00:23,500 --> 00:00:26,700
You know the rules and so do I
Use SRT for:
- Importing into a video editor (Premiere, Final Cut, DaVinci, CapCut)
- Re-uploading captions to another platform
- Creating accessibility tracks for re-published videos
- Translating subtitles and re-syncing them
JSON — Structured Data
Preserves segment-level structure with millisecond timestamps. Use JSON for:
- Programmatic processing (search, analysis, summarization)
- Feeding into a database or vector store
- Building any feature on top of transcripts in code
- Maintaining timing data for downstream tools
If you’re not sure, download TXT for reading and JSON if you might process the data later. SRT is specifically for video tooling.
How to Copy a YouTube Transcript Without Downloading
If you only need the text in your clipboard:
- Web tool method: Paste the URL into the TubeAlfred tool, hit Copy text. Cleanest output, mobile-friendly.
- YouTube panel method: Manual select-all from the transcript panel. Messy formatting, desktop only.
The web tool method gives you a clean paragraphed version without timestamps. The YouTube panel method gives you raw segments with embedded timestamps.
How to Extract Transcripts From Many Videos at Once
For a few videos, paste URLs into the tool one at a time. For dozens or hundreds, use the API.
# Loop in a shell script
for VID in $(cat video_ids.txt); do
curl -s https://api.tubealfred.com/v1/youtube/video/$VID/transcript \
-H "Authorization: Bearer ta_live_xxx" \
> "transcripts/$VID.json"
done
For a whole channel, the API has a channel endpoint that pulls every video’s transcript without you maintaining the video list. Documented in the API guide.
Frequently Asked Questions
Can I download YouTube transcripts for free?
Yes. The TubeAlfred web tool is free for single videos. The Python library youtube-transcript-api is free for small-scale developer use. Costs only kick in if you’re using the paid API for batch or production workloads.
What format does YouTube use for transcripts?
Internally, YouTube serves caption tracks as TimedText XML or JSON. End users never see this — tools (including ours) parse it and re-format into TXT, SRT, JSON, or VTT.
Can I download YouTube transcripts as PDF?
Not directly. Download as TXT and convert in any word processor (paste into Google Docs, Word, or Pages, then File → Export → PDF). For automation, run the TXT through a markdown-to-PDF tool.
Can I download YouTube transcripts as Word documents?
Same answer: download TXT and convert. There’s no real benefit to a native .docx download because the source is plain text — no formatting to preserve.
How do I download a YouTube Shorts transcript?
Same as a regular video. Paste the Shorts URL into the TubeAlfred transcript tool; it supports both regular videos and Shorts.
Can I download a transcript with translated text?
Yes. In the web tool, request the language you want using the Translate button. In the API, pass ?language=es (or any ISO code) on a video with that language track, or use YouTube’s native track translation for any video.
What’s the difference between SRT and VTT?
SRT is older and more universal. VTT (WebVTT) is newer and adds styling and metadata features. For most use cases SRT is enough. If your video platform specifically requires VTT, convert SRT to VTT (search for any free converter) or use a tool that exports VTT directly.
Can I extract transcripts from private videos?
No. Private videos require an authenticated YouTube session that public transcript tools can’t use. Even the Python library can’t pull them without a logged-in cookie file, which is fragile and not recommended for production.
Can I extract YouTube comments alongside the transcript?
Not from the same endpoint, but TubeAlfred has a separate YouTube Comment Downloader for that. Both tools share the same credit system if you go paid.
Next Steps
Try the TubeAlfred YouTube Transcript Generator for a single video, or jump straight to the API if you’re downloading at scale. For a side-by-side of every free tool, see Best Free YouTube Transcript Generators.