Fix Subtitles That Are Out of Sync With Audio
Measure one moment where the spoken word and caption should coincide, then enter that constant difference. Choose Later if the subtitle appears too soon and Earlier if it appears too late. Every cue receives the same millisecond offset, so a constant sync error is corrected without changing cue durations.
A UTF-8 SubRip (.srt) or WebVTT (.vtt) file up to 20 MB. The file is read only in this tab.
A constant offset fixes a subtitle track that is uniformly early or late from beginning to end.
If the error grows during playback, the problem is drift or playback speed and a single offset cannot fix it.
WebVTT cue settings, identifiers, comments, style blocks and subtitle text are retained while timing lines change.
How it works
How it is done
- Read the file as UTF-8 in this browser tab. Preserve an existing UTF-8 byte-order mark and each line ending; refuse UTF-16, invalid UTF-8 and binary input rather than guessing an encoding and damaging subtitle text.
- Treat a WEBVTT magic header as WebVTT and an accepted file without that header as SubRip. A file named .vtt is refused when the required WEBVTT first line is missing.
- Walk blank-line-separated blocks. Preserve WebVTT header, NOTE, STYLE and REGION blocks; recognise a cue only when one of its first two lines matches that format's complete start-arrow-end grammar.
- Parse each start and end into an integer number of milliseconds and require the end to be later than the start. Round the requested offset to one millisecond, then add it for Later or subtract it for Earlier.
- When an earlier shift puts a whole cue at or before zero, remove it because no negative playback time exists. When only the start crosses zero, either clamp the start to zero or remove the cue, exactly as selected.
- Write only the recognised timing line back in the source format. Preserve cue numbers, identifiers, payload text, WebVTT cue settings, structural blocks, a UTF-8 marker and the line endings of every surviving line, then offer the complete file for download.
What it assumes
- One constant offset applies to the whole file. If captions are aligned at the start and increasingly wrong later, that is drift or a playback-speed mismatch and cannot be repaired by adding one number everywhere.
- The offset is entered in seconds and rounded once to the nearest millisecond, because both supported file formats physically store three decimal digits. Later is positive and Earlier is negative in the result panel.
- SubRip timing is hours:minutes:seconds,milliseconds around the --> arrow. Numeric cue counters, including the compact form where the counter shares the timing line, are preserved and are not renumbered when an early cue is removed.
- WebVTT requires a WEBVTT first line, uses a full stop before milliseconds and may omit the hours component while it is zero. Existing hours notation is retained, and hours are added if a shifted timestamp crosses 60 minutes.
- WebVTT NOTE, STYLE, REGION, cue identifiers and settings are kept byte for byte apart from their surviving line endings. A cue containing an inline WebVTT timestamp tag is refused because changing only its outer times would corrupt karaoke-style internal timing.
- Cues may overlap before or after the shift; applying one offset preserves that relationship. This tool validates timing syntax and direction but does not decide whether an overlap was intended.
- Input is capped at 20 MB and 250,000 cues. The worker yields while scanning a long file so progress and Cancel remain responsive.
Common questions
Why are the subtitles correct at the start but wrong near the end?
That is timing drift rather than a constant offset, often caused by different frame rates or playback speeds. Moving every cue by the same amount cannot correct an error that grows over time.
Can the tool shift both SRT and WebVTT captions?
Yes. SRT uses comma-separated milliseconds and WebVTT uses a WEBVTT header with dot-separated milliseconds; the tool recognises each format and writes the same format back.
Sources
The full method, worked example and every assumption behind this figure are on Subtitle Time Shifter.