Video to GIF, Trim & Convert
runs in your browserTurn a video into a GIF, or trim and re-encode it to MP4 or WebM, entirely in your browser. Frame rate, colours, dithering and size, no upload.
Drop a file here, or .
One video: MP4, MOV, WebM or MKV. Converted in your browser; nothing is uploaded.
about this tool
WebCodecs, not ffmpeg
This tool uses the video encoders and decoders that are already in your browser, through WebCodecs, driven by the mediabunny library. That means no 30 MB WebAssembly build of ffmpeg to download, hardware-accelerated encoding where the device offers it, and nothing leaving the page.
The trade-off is honest: WebCodecs is needed. Chrome, Edge, Safari 16.4 and Firefox 130 have it; older browsers are told plainly rather than left to fail halfway. ffmpeg's WebAssembly build was the alternative and was rejected on two counts — it is licensed GPL-2.0-or-later, which is not compatible with this site, and the core alone is tens of megabytes.
Trimming
Play the clip, press Here to take the current time as the start or the
end, or type times as 0:05, 1:05.5 or 65.5. The trim is kept inside
the video and can never run backwards. MP4 and WebM keep the sound unless
you drop it; a GIF has no sound at all, and says so.
Making a GIF
Frames are taken at even intervals across the trimmed range, stopping just before the end so a loop does not show the same frame twice. The count is capped at 600, and when the cap bites the panel tells you the frame rate you will actually get.
The GIF itself is written here rather than by a library. A palette of up to 256 colours is chosen by median cut over a sample of every frame — the busiest box is split along its widest channel until there are enough colours — and each pixel is mapped to the nearest one, optionally with Floyd–Steinberg dithering. Frames are then LZW-compressed into a GIF89a file with a Netscape block for looping.
Two details worth knowing. Frame delays are stored in hundredths of a second, which does not divide evenly by most frame rates, so the delays are worked out against a running total rather than one at a time; a 30 fps GIF therefore lasts exactly as long as its source. And with store only what changes on, each frame keeps a transparent index wherever the picture is identical to the frame before, which for a mostly still shot cuts the file considerably.
Limits
The whole output is held in memory before it is saved, so very long or very large clips will run a device out of room; the tool is meant for clips of seconds to a few minutes. Audio is passed through or dropped, not re-mixed or trimmed separately. There is no cropping, rotation or filter. GIF output is limited to 256 colours by the format itself, so photographic video will always band a little. Nothing is stored between visits.
For the soundtrack on its own, use the audio trimmer & converter. A GIF is often larger than the video it came from, so if the target accepts video, keep the MP4 — and image compressor can shrink an exported frame.
questions
- How does it convert video without uploading it?
- Through WebCodecs, the browser’s own access to the video encoders and decoders your device already has, driven by the mediabunny library. There is no ffmpeg and no WebAssembly to download, and the file never leaves the page. Chrome, Edge, recent Safari and recent Firefox have WebCodecs; anything older is told so rather than left to fail.
- Why is my GIF so big?
- A GIF stores whole frames with no motion compensation, so size grows with width times height times the number of frames. Halving the width quarters the file. Lowering the frame rate, cutting the colours down and keeping the clip short all help, and storing only what changes between frames — on by default — usually helps most.
- What do colours and dithering do?
- A GIF can hold at most 256 colours, so the palette is chosen by median cut over a sample of every frame. With fewer colours, smooth gradients turn into visible bands; dithering scatters the error into neighbouring pixels to disguise that, at some cost in file size because it makes the picture noisier.
- Is there a limit on how long a clip can be?
- For a GIF the frame count is capped at 600, so a long clip simply runs at a lower frame rate and the panel says what it will be. For MP4 and WebM the limit is your device’s memory, since the whole output is assembled before it is saved.
- Why did the size or shape change slightly?
- H.264 needs even numbers of pixels on both sides, so the height is rounded to the nearest even number when you pick MP4. Videos are never scaled up, so asking for a width larger than the original leaves it alone.