GIF to MP4 converter
Turn a GIF into a small H.264 MP4 that keeps its timing, played once or on repeat.
Runs in your browser. Nothing is uploaded.
Drop a GIF
Animated or still. It stays on your computer.
More about this tool
- 1
Add a GIF
Drop an animated GIF. Its size, frame count and length show up.
- 2
Set loops and background
Choose how many times it plays and what shows behind transparent parts.
- 3
Convert and download
The MP4 plays on the page so you can check it, then download it.
A GIF stores each frame with at most 256 colours and compresses it on its own, so even a few seconds can run to megabytes. H.264 video compresses across frames, so the same clip as an MP4 is usually several times smaller and has no colour limit.
Video editors and most upload forms that ask for a video take MP4, not GIF. Converting first means the clip goes in as a video.
A GIF loops forever in a browser, but a video plays once unless the player loops it. Repeat the GIF two, three or five times inside the MP4 when you need a longer clip, for example to meet a minimum video length.
Each frame keeps its own delay. Frames saved with a delay of 10 ms or less play at 100 ms, which is what browsers do, so the MP4 runs at the speed you saw.
MP4 video has no transparency, so transparent parts are filled with the background you pick. H.264 also needs even dimensions, so a GIF with an odd width or height loses one pixel on that edge.
The same conversion on the command line; the scale filter rounds odd sizes down to even:
- ffmpeg -i input.gif -movflags +faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4
- To play it three times: ffmpeg -stream_loop 2 -i input.gif -movflags +faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4
Sources
Questions
No. It's decoded and encoded in your browser. Nothing is sent anywhere.
It's encoded at high quality, and a GIF is already limited to 256 colours, so it looks the same. It's usually much smaller too.
H.264 needs an even width and height, so an odd edge is trimmed by one pixel. Nothing else is cropped.
No. A GIF has no sound, so the MP4 is silent.
Chrome and Edge. The tool needs to read GIF frames and encode H.264 in the browser, and says so if yours can't.
More free tools
- Video compressor
Shrink a video to a size limit, such as 25 MB for email, without uploading it.
- Video trimmer
Cut the start and end off a video, to the tenth of a second, without uploading it.
- Video cropper
Crop a video to 9:16, 4:5, 1:1, 16:9 or any box you drag, without uploading it.
- Remove audio from video
Mute a video by taking out its sound, without re-encoding or uploading it.
- Discord video compressor
Fit a clip under Discord's 20 MB free upload limit, or 50 MB with Nitro Basic.
- MOV to MP4 converter
Turn an iPhone, QuickTime or screen recording MOV into MP4, usually without re-encoding.
- WebM to MP4 converter
Re-encode a WebM to H.264 and AAC MP4 that iPhones, editors and upload forms accept.
- MKV to MP4 converter
Turn an MKV, such as an OBS recording, into an MP4, usually without re-encoding.
- Video to GIF converter
Turn a clip from an MP4, MOV or WebM video into a looping GIF, without uploading it.
- GIF compressor
Shrink a GIF by cutting its size, colors or frames, and see the new file size right away.
- WebP to GIF converter
Turn an animated WebP into a GIF that plays in apps and sites that won't take WebP.
- MP3 to MP4 converter
Put a picture to an MP3 and get an MP4 you can upload to YouTube or social apps.
- Video frame extractor
Save any frame of a video as a PNG or JPG, or extract one every few seconds as a ZIP.
- Contact sheet maker
Turn a video into a grid of timestamped frames, for the whole video or just the hook.