LocalExcelTool
Get started

Video to GIF

Turn part of a video into an animated GIF.

Runs in your browserNo account neededFree up to 50 MB

What is Video to GIF

The Video to GIF tool converts a section of an MP4 into an animated GIF. Frames are pulled with WebCodecs and quantised to 256 colours with gifenc — no ffmpeg download, and the video is never uploaded. Because GIFs grow fast, the limits are 10 seconds, 640 px wide and 24 fps.

File

No file chosen

… up to 50 MB · up to 5s

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Size limit
50 MB free, 200 MB with Pro
Duration limit
5s free, 0 min with Pro
Offline
Works with the network disconnected

A GIF is a palette, and that is the whole constraint

GIF allows 256 colours per frame and no inter-frame compression beyond simple rectangles. Converting video means quantising each frame to a palette and encoding LZW, which is why a ten-second GIF can be larger than the minute of video it came from.

The palette is chosen per frame or shared across the animation. Per-frame palettes look better and produce larger files; a shared palette is smaller and shows banding on gradients and skin tones. This tool quantises with gifenc and applies the palette per frame.

Ten seconds, 200 MB, and why both are hard limits

GIF size scales with duration, frame rate and dimensions, roughly linearly with each. A 10-second clip at 640px and 15fps is already several megabytes; at full resolution and 30fps it becomes tens of megabytes, which is unusable in a chat or on a page.

The practical recipe is: crop to the action, halve the frame rate to 12–15, reduce width to 480–640, and accept that a GIF is a short loop rather than a video. Anything longer is better as an MP4, which is smaller and higher quality — the only reason to choose GIF is compatibility.

Looping and the first-frame problem

A GIF loops forever by default, so the last frame must lead back into the first or the result stutters at every repeat. Trimming to a natural cycle — a full rotation, a complete gesture — is what makes a loop look intentional.

Also check the first frame against the poster image where the GIF is embedded. Many players show frame one as the still, and a frame that is mid-motion reads as a broken image until the animation starts.

How to use it

  1. 1.Choose a video
  2. 2.Pick width, frame rate and range
  3. 3.Download the GIF

How Video to GIF works under the hood

Audio and video work on containers and codecs, which are different layers. Extracting audio copies encoded samples; compressing video must decode and re-encode every frame. That difference explains the speed gap between the two tools.

  1. 1

    Demux the container

    mp4box reads the MP4 boxes (ftyp, moov, mdat) and exposes the individual tracks without touching their encoded data.

  2. 2

    Extract or decode

    Audio extraction copies the AAC samples straight into a new container. Compression decodes each frame through WebCodecs' VideoDecoder.

  3. 3

    Re-encode if needed

    Frames are scaled on a canvas and re-encoded with VideoEncoder at the chosen bitrate and resolution; audio is re-encoded to AAC or MP3.

  4. 4

    Mux the result

    mp4-muxer writes a fresh MP4 with a correct index, so the output seeks properly in any player.

  5. Processing pipeline

Why compression is CPU-bound

Decoding and re-encoding a 10-minute 1080p video means processing roughly 18,000 frames twice. WebCodecs uses hardware acceleration when the browser exposes it, but the tab still does the work — expect minutes, and keep the tab in the foreground. This is also why the free tier caps duration rather than file count.

Extraction is lossless

Pulling audio out of a video does not re-encode it, so the sound is bit-for-bit what was in the original. Converting to MP3, however, does re-encode and is lossy; if you need an exact copy, choose the original codec (AAC/M4A) rather than MP3.

Cut points land on keyframes

A compressed video stores full frames only at keyframes; the frames between them depend on earlier ones. Trimming therefore snaps to the nearest keyframe unless the clip is re-encoded, which is why a trim can start a fraction of a second late. Re-encoding costs quality and time; snapping costs a few frames.

Verify it yourself

The file is read by the browser, not uploaded. Watch the network panel during a run.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

How long can the clip be?

The free tier allows 3 seconds, Pro up to 10 seconds. A GIF stores nearly uncompressed frames, so longer clips quickly reach tens of MB.

Can I control the quality?

Pick a width (320/480/640) and a frame rate (10/12/15/24). File size scales roughly with width × fps.

Text and thin lines flicker

GIF allows 256 colours, so gradients and thin lines lose detail. A larger width helps a little.

Is this tool free?

Yes — no sign-up and no card. The free tier handles 3 seconds / 50 MB. Everything runs in your browser, so your file is never uploaded.

What happens if my file is over the limit?

You see a notice before any processing starts, and nothing is charged automatically. Pro raises the limit to 10 seconds / 200 MB. If you'd rather stay free, compress or split the file first.

What this kind of conversion cannot keep

Video and audio are processed with the browser's own codecs (WebCodecs where available, otherwise a JavaScript encoder). It is slower than a native app because it runs on one thread in a sandbox, but the file is never uploaded — which is the only reason to accept the trade.

More in Video & Audio