GIF to MP4

Turn an animated GIF into an MP4 that carries the same frames in a fraction of the bytes.

Secure server processingMoreWorkingNo account needed

What this tool does

GIF to MP4 hands your animation to ffmpeg on the processing service, which decodes every frame and re-encodes it with x264 at the veryfast preset. The index is written at the front of the MP4, so a player can start before the whole file has arrived. The size difference comes from how the two formats store motion: a GIF holds every frame as its own 256-colour image with only modest compression between them, while H.264 codes most frames as the difference from the one before. A loop where much of the picture holds still is close to the ideal case for that, which is why a screen recording can drop by an order of magnitude and a grainy, fast-moving animation by much less. The result screen shows the before and after sizes measured from the actual files, so you are not left guessing which of those you got.

Quality is a constant-quality target rather than a size target — high, balanced and small reach the encoder as CRF 20, 26 and 32 — so you decide how much detail survives and the file size follows from that. There is no target-size option here. The three-second minimum is the other switch that changes the output: tick it and an animation shorter than three seconds has whole plays repeated until the total clears that mark, because several social platforms reject very short uploads. A one-second loop comes back as exactly three seconds and a 1.2-second one as 3.6, since it is complete repeats being added rather than a padded tail. Anything already three seconds or longer is passed through at its own length.

The frame-rate menu resamples the animation on the way through. Leave it on Match the GIF and every frame keeps the interval it already had; pick 15, 24 or 30 and ffmpeg resamples to that constant rate before the encoder sees anything. Downwards is the useful direction — a 30 fps screen capture written out at 15 drops half its frames and a good deal of its size with them. Upwards only repeats frames to fill the gaps: it costs a few kilobytes and buys no smoother motion, because the frames it would need were never in the GIF to begin with.

One property of the output is worth knowing, because it is not the one ffmpeg would choose. Left alone, the encoder matches a GIF's full-colour frames with 4:4:4 chroma and writes a file whose profile reads High 4:4:4 Predictive. No colour detail is discarded that way, which flatters the coloured text and hard edges a screen recording is full of, but 4:2:0 is the variant the wider world assumes: it is what phone hardware decoders and upload pipelines are built around, and a 4:4:4 file can be turned away where an ordinary MP4 would not be. So this tool pins 4:2:0 and the result comes out plain High profile. The cost is that colour is sampled at half resolution horizontally and vertically, which very fine coloured text or a hard colour edge can show; brightness detail is untouched.

Frame size crosses over intact but for one exception: 4:2:0 cannot describe an odd number of pixels, so an odd width or height is trimmed by one and a 499x281 GIF comes back 498x280, while an even-sized animation keeps its exact dimensions. Two other things do not survive at all. H.264 has no alpha channel, so a GIF with transparent areas is flattened — they arrive as a flat fill, white on the files this has been tried against, and nothing shows through them any more. And an MP4 carries no loop instruction of its own, so whatever page or app displays it decides whether it repeats.

How to use it

  1. Add the GIF. One animation per job, up to the 200 MB upload ceiling. Drop several in and each is converted as its own job, one after another.
  2. Choose a frame rate. Match the GIF keeps the timing the animation already has. Pick 15, 24 or 30 to resample to a constant rate — worth doing to bring a 30 fps screen capture down to 15 and take a good deal of the size with it.
  3. Choose a quality tier. High keeps the most detail, small makes the smallest file, balanced sits between the two. The tier drives the encoder and the size is whatever that produces.
  4. Decide about the three-second minimum. Leave it off for an animation going onto a page you control. Turn it on when the destination rejects clips of a second or two.
  5. Run it and take the video. The result keeps the GIF's own name with -convert.mp4 in place of the extension, so the animation and the video can sit in the same folder without colliding. If the GIF had an odd width or height, check the dimensions — one row or column is trimmed to make the frame even.

Processing & privacy

Secure server processing. This operation requires temporary server processing.

Common use cases

Cutting the weight of a page

A screen recording saved as a GIF runs to megabytes and is a real load-time problem. The same animation as H.264 is usually a few hundred kilobytes.

Archiving a folder of loops

A collection of reaction GIFs takes far less disk space as video, and every file can go through in one sitting as its own job.

Sending a loop by email or chat

Attachment limits are measured in megabytes. Converting a heavy GIF to MP4 keeps the animation and ends the argument with the mail server.

Bringing an animation into an edit

Video editors handle H.264 predictably, while an animated GIF is often imported as a single still or laid onto the timeline at the wrong rate.

Questions

Is the GIF uploaded to a server?
Yes. ffmpeg runs on the processing service rather than in the tab, so the file travels there over an encrypted connection, is converted, and is swept off the disk together with the MP4 when the job's retention window runs out — six hours by default.
Why is the MP4 so much smaller?
Because H.264 stores the difference between one frame and the next, while GIF stores each frame as a whole palette image. The more of the picture that holds still between frames, the wider that gap becomes.
Will it play anywhere an ordinary MP4 plays?
It should. The encode is H.264 High profile with 4:2:0 colour and the index at the front of the file, which is what phone hardware decoders and upload pipelines are built around. The GIF conversions that get refused on a phone are usually 4:4:4 encodes — the format ffmpeg reaches for on GIF frames unless it is told otherwise, and the one this tool pins away from.
Does the frame rate menu change anything?
Yes. Match the GIF leaves the animation's own timing alone, while 15, 24 and 30 resample it to that constant rate before encoding. Below the GIF's own rate that drops frames and shrinks the file; above it, frames are repeated to fill the gaps, which costs a few kilobytes and adds no smoothness.
What becomes of a GIF's transparency?
It is filled in. MP4 video has no alpha channel, so anything the GIF left see-through arrives as flat colour instead. When the transparency matters, keep the GIF, or use APNG Converter to write APNG or animated WebP, both of which carry alpha.
Will the MP4 loop the way the GIF did?
Only if the page it sits in asks for that. A GIF carries its own loop instruction and an MP4 does not, so the page or app showing it decides. In HTML that means a video element with loop, autoplay, muted and playsinline set.
Why is there a puzzle before the job starts?
Transcoding occupies a processor core for the length of the job, so a signed-out request to this operation is asked for a short arithmetic, sequence, ordering or word puzzle before anything is queued. An active signed-in account skips it.
What if the GIF is not animated?
A single-frame GIF is accepted, but it produces a video one frame long, which no player shows usefully. Convert Image is the right tool for a still picture.
How large a GIF can I send?
Up to 200 MB per file, one per job, and each job has a ten-minute processing ceiling. Reaching that with a GIF is unusual — the ceiling is sized for long video, and GIF frames decode quickly.

Related tools

  • Video to GIF — Turn a short clip into an animated GIF.
  • QR Code Generator — Create a QR code for a link, text, Wi-Fi or vCard.
  • GIF Maker — Build an animated GIF from images or a clip.
  • GIF Compressor — Reduce GIF file size by trimming frames and colours.
  • GIF Splitter — Split an animated GIF into individual frames.
  • GIF Resizer — Resize an animated GIF without losing the animation.