Skip to main content
SubtitleMatrix

Trim Subtitles to a Time Range

TimingTrim and split by time
Or paste subtitle text

Options

Everything on screen before this instant goes. A cue that began earlier but is still on screen at this instant is kept, cut at the edge. Leave it empty for a window that starts with the file.

Everything that begins at or after this instant goes, and a cue that runs past it is cut there. The instant itself is not part of the window: a cue starting exactly on it belongs to the next stretch. Leave it empty for a window that runs to the end of the file.

Which frame rate the timings are counted in. On the format pages this is what MicroDVD needs, because it stores timing as frame numbers. On the frame rate pages it is the rate the file was timed against — the version the subtitles were made for — and the page's second box takes the rate of the video you are going to use them with. 23.976, 24, 25, 29.97, 30, 50, 59.94 and 60 are the common ones. Getting it wrong shifts the whole timeline, and on the frame rate pages it shifts it by a ratio rather than by a fixed amount.

This page keeps the part of a subtitle file that falls inside a time window and removes the rest. Give it a start, an end, or both, and it walks the file once: cues that lie entirely outside the window are dropped, cues that straddle one of its edges are cut at that edge, and cues that sit wholly inside come through untouched.

The rule is overlap, not "where does it start". A cue that began at four seconds and is still on screen at five is part of the five-to-ten window, so it survives — with its start pulled forward to exactly five seconds. This is the difference between trimming a file and moving a stretch of its timeline: a page that judged by start times would delete that cue and take a line of dialogue with it, while one that judged by ends would keep cues that have not begun yet.

The window's closing instant is not included. A cue that starts exactly where the window ends belongs to the next stretch of the film, not this one, and a cue that ends exactly where the window opens has already left the screen. Half-open boundaries look pedantic until you trim two neighbouring ranges of the same file and find the same line in both.

Everything happens in this browser tab: the file is read, cut and written again locally, and no byte of it is uploaded. SRT, WebVTT, ASS, SSA, SBV, SAMI, MicroDVD, TTML, JSON and CSV are accepted; MicroDVD needs its frame rate in the box because its timings are frame numbers.

Examples

A ten-second window out of the middle of a file

Input

1
00:00:01,000 --> 00:00:02,500
Before the window.

2
00:00:04,000 --> 00:00:06,000
Crosses the start.

3
00:00:07,000 --> 00:00:08,000
Fully inside.

4
00:00:09,000 --> 00:00:11,500
Crosses the end.

5
00:00:14,000 --> 00:00:15,000
After the window.

Output

2
00:00:05,000 --> 00:00:06,000
Crosses the start.

3
00:00:07,000 --> 00:00:08,000
Fully inside.

4
00:00:09,000 --> 00:00:10,000
Crosses the end.

Five cues, four different outcomes, one pass. Cue 1 had already gone by the time the window opened and cue 5 had not arrived yet, so both are dropped. Cue 2 started at four seconds but was still speaking at five, so it stays and its start is pulled to 5000 ms. Cue 4 loses its last 1.5 seconds the same way. Cue 3 was never touched.

Only the opening bound: cutting the intro

Input

1
00:00:00,500 --> 00:00:02,000
Intro card.

2
00:00:02,500 --> 00:00:04,000
Still talking over the logo.

3
00:00:05,000 --> 00:00:06,000
First line of the programme.

Output

2
00:00:03,000 --> 00:00:04,000
Still talking over the logo.

3
00:00:05,000 --> 00:00:06,000
First line of the programme.

The closing box is empty, which means there is no closing bound — the window runs to the end of the file. The intro card is dropped and the line spoken across the three-second mark is cut there. An empty box is not a zero: filling in 0 in the closing box would produce an empty window and the page would say nothing was done.

A window wider than the file

Input

1
00:00:01,000 --> 00:00:02,000
Short.

2
00:00:03,000 --> 00:00:04,000
Also short.

Output

1
00:00:01,000 --> 00:00:02,000
Short.

2
00:00:03,000 --> 00:00:04,000
Also short.

Both cues lie inside, so both come back byte for byte. Nothing is shifted to the window's start — a cue at one second stays at one second even if the window opens at zero. Trimming removes what is outside; it does not move what is inside.

Frequently asked questions

What happens to a subtitle that begins before my window but is still on screen inside it?

It is kept, and its start time is pulled forward to exactly the window's opening instant. The rule the page applies is overlap: if any part of the cue falls inside the window, that part belongs to the result. This is the single most important difference between trimming a file and shifting a range of its timeline, and it is why a line spoken across the boundary does not vanish when you cut there.

Does trimming renumber the cues that survive?

No. A cue keeps the number it had in the file, so a kept stretch that began at cue 2 still starts at number 2 and the gaps in the numbering show what was removed. Renumbering would be a separate change to lines you did not ask about, and it would make it harder to line the trimmed file back up against the original when you need to check a line.

Why does a cue that ends exactly where my window opens disappear?

Because it has already left the screen when the window opens — the boundary belongs to the window that follows. The same rule at the other end: a cue that starts exactly where the window closes belongs to the next stretch. Both boundaries are half-open, which is what stops two neighbouring ranges of one file from each claiming the cue that sits on their shared edge.

Can I leave one of the two boxes empty?

Yes, and it is the usual way to use the page. An empty opening box means the window starts with the file; an empty closing box means it runs to the end. Filling in only the opening box cuts the intro, only the closing box cuts the tail. If both boxes are empty, or the closing instant is not later than the opening one, the page reports that nothing was done rather than returning an empty file.

Is anything reported as lost when I trim a subtitle file?

No. Removing what lies outside the window is what the page is for, so it is not reported as damage; the result line tells you how many cues were dropped and how many were cut at an edge. That is different from a page that drops cues as a side effect of something else, where the loss report is the only place the removal would ever be mentioned.

Which subtitle formats can be trimmed, and why are some left out?

SRT, WebVTT, ASS, SSA, SBV, SAMI, MicroDVD, TTML, JSON and CSV. Plain text and LRC are not accepted because trimming reads and writes both ends of every cue, and those two formats do not carry an end time in the file — an end derived from the next cue's start would be rewritten as the next cue's start, so the output would be byte-identical to the input and the page would be lying about what it did.

Related tools