Convert, retime, clean and transcribe subtitle files without leaving VS Code.
Subtitle files are plain text, so people already open them in an editor. This
extension adds the handful of operations that otherwise mean a round trip
through a website or a desktop app.
Commands
Open a .srt or .vtt file and run these from the Command Palette
(Ctrl+Shift+P / Cmd+Shift+P):
| Command |
What it does |
| Subtitles: Convert to SRT |
Opens the cues as SubRip in a new tab, renumbered from 1 |
| Subtitles: Convert to VTT |
Opens the cues as WebVTT in a new tab |
| Subtitles: Extract Plain-Text Transcript |
Strips all timings — one line per cue, or flowing paragraphs that break on a silence longer than 4s |
| Subtitles: Shift Timings... |
Moves every cue earlier or later. Accepts 1500, 250ms, -2s, 1.5s |
| Subtitles: Clean Up... |
Pick any of: remove formatting tags, remove hearing-impaired cues, drop empty cues, collapse whitespace, fix overlapping timings |
| Subtitles: Find & Replace in Cue Text... |
Plain text or regex, applied to cue text only — timings are never touched |
The status bar shows a live cue count for the file you are editing.
Conversions and transcripts open in a new tab, so your original file is left
alone. Shift, clean and replace edit the current document in place, so
Ctrl+Z undoes them like any other edit.
Design notes
- Fully offline. No network calls, no accounts, no sign-in.
- No telemetry. The extension collects nothing.
- Format-preserving. Editing a
.vtt gives back VTT; editing a .srt gives
back SRT.
- Lenient parser. Handles CRLF line endings, a UTF-8 BOM, WebVTT
NOTE and
STYLE blocks, cue identifiers, and cue settings on the timing line
(00:00:04.000 --> 00:00:06.000 align:start).
Known limits, stated plainly
- Clean-up removes hearing-impaired cues by pattern, not by understanding. It
targets
[BRACKETED TEXT], (CAPITALISED EFFECTS) and SPEAKER NAME:
prefixes. Ordinary parenthetical prose such as (this stays) is deliberately
left alone, but an unusual convention may need a manual pass.
- ASS/SSA files are not supported. Only SubRip (
.srt) and WebVTT (.vtt).
- Styling blocks in a VTT file are dropped on conversion, since SRT has no
equivalent.
Testing
The parsing, conversion and transform logic lives in src/subtitle.js, which
has no dependency on VS Code, and is covered by an offline suite:
npm test # 73 assertions, exit code 0 on success
That includes an SRT → VTT → SRT round trip asserting timings and text survive
unchanged.
Browser versions of these same tools, if you would rather not install anything:
Subtitle Toolbox.
License
MIT — see LICENSE.