A focused Chrome extension for copying YouTube subtitles as clean, timestamped plain text. Open a video, choose the subtitle track, copy the transcript, and paste it anywhere.
Video title
(0:00) First aggregated paragraph from several caption fragments.
(0:48) Next paragraph with a readable timestamp.
- Copies YouTube transcripts from a compact popup.
- Supports manual and auto-generated caption tracks.
- Preserves useful timestamps while grouping tiny caption fragments into readable paragraphs.
- Cleans caption markup, HTML entities, repeated rolling captions, and excess whitespace.
- Picks the subtitle track closest to the browser UI language when available.
- Uses Chrome i18n for a localized popup interface.
- Ships with a dependency-free build pipeline for Chrome Web Store ZIPs.
- Requests only the
activeTabpermission and no persistent host permissions.
- Open
chrome://extensions. - Enable Developer mode.
- Click Load unpacked.
- Select this project folder.
- Open a YouTube watch page and click the extension icon.
- Navigate to a YouTube video with subtitles.
- Open the extension popup.
- Select the subtitle language.
- Click Copy transcript.
The copied output starts with the video title, followed by timestamped transcript paragraphs.
npm run verify
npm run buildThe build script creates:
dist/youtube-copy-transcript-<version>.zip
The ZIP includes the manifest, popup, content scripts, icons, locale files, and README.
npm run release -- 0.2.0The release script:
- Updates
manifest.json. - Updates
package.json. - Builds the Chrome Web Store ZIP.
- Runs verification checks.
npm run verifyThe verifier checks:
- Manifest V3 shape.
- Permission scope.
- Referenced file existence.
- JavaScript syntax.
- Forbidden extension-code patterns.
- Required locale files and message keys.
- Version parity between
package.jsonandmanifest.json.
| File | Purpose |
|---|---|
manifest.json |
Chrome MV3 manifest, popup action, icons, permissions, and YouTube content scripts. |
page-bridge.js |
Runs in the page's main world and reads the live YouTube player caption metadata. |
transcript.js |
Fetches caption data, falls back when needed, cleans fragments, and aggregates paragraphs. |
content.js |
Bridges popup messages to the transcript API exposed in the content script. |
popup.html |
Popup markup and user-facing controls. |
popup.css |
Popup styling. |
popup.js |
Popup state, localization, track selection, and clipboard copy flow. |
_locales/ |
Chrome i18n message files. |
icons/ |
Extension icons. |
scripts/build.js |
Dependency-free ZIP builder. |
scripts/verify.js |
Pre-publish validation. |
scripts/release.js |
Version bump, build, and verification workflow. |
The extension asks YouTube's live player for caption tracks, then tries multiple transcript sources:
- Caption track download in
json3format. - Caption track download in XML format.
- XML retry with a harvested
pottoken when YouTube requires it. - DOM transcript panel scraping as a final fallback.
Fragments are de-duplicated and merged into paragraphs using span and character thresholds, with soft breaks at sentence boundaries when possible.
The extension is designed to work on the active YouTube tab only.
- No analytics.
- No external services.
- No background server.
- No persistent host permissions.
- Caption downloads use
credentials: "omit"where the browser allows it.
Downloading caption files does not report playback progress to YouTube, so copying a transcript does not mark a video as watched.
The popup follows the browser UI language through Chrome's _locales mechanism.
Supported locales:
en, es, pt_BR, fr, de, it, nl, pl, uk, tr, ar, hi,
id, vi, th, zh_CN, zh_TW, ja, ko, cs, ro, sv, da, ms
- Google Chrome or another Chromium browser with Manifest V3 support.
- Node.js for build, release, and verification scripts.
No npm dependencies are required.
