HomeToolsVideo Tools › GIF to MP4 Converter

GIF to MP4 Converter

Live

Convert any animated GIF to a smooth, compact MP4 video — free, instant, no upload required.

About GIF to MP4 Converter

A GIF that loops forever on a product page or in a Slack message costs anywhere from 5 to 40 times the bandwidth of the same clip encoded as MP4. The AT USE GIF to MP4 Converter encodes your GIF frames into an H.264 MP4 container in the browser — the resulting file embeds in any HTML5 <video> tag, autoplays silently in Chrome, Firefox, and Safari (all support muted autoplay), and carries none of the colour limitations that make GIFs look degraded on gradients and photographic content. Everything runs locally via ffmpeg.wasm: no upload, no server queue, no waiting.

The conversion is especially useful on the web, where a hero GIF is the single most common cause of slow above-the-fold load times. Replacing a 12 MB GIF with its H.264 equivalent typically produces a file under 1 MB with better colour rendering — not because you lost quality, but because H.264 inter-frame prediction stores only what changed between frames rather than nearly full-frame data per tick the way GIF does. For email, most clients will not autoplay video, but for web embeds, GitHub README files, Notion pages, Loom-style documentation, and social platforms that accept MP4, the conversion eliminates the GIF size penalty entirely.

How to use

  1. Upload your GIF by dragging it onto the upload zone or clicking Choose file. Animated GIFs up to 20 MB are accepted. Large GIFs (500+ frames) may take a few seconds to parse as ffmpeg inventories the frame count.
  2. Preview the animation in the player that appears. The frame count and duration are shown beneath — use these to confirm the right file loaded, especially if you have multiple versions of the same GIF.
  3. Select quality from the Quality dropdown if available. Higher quality uses a lower CRF value in H.264 (which means larger file, sharper output); lower quality uses a higher CRF for smaller files. For most screen recordings and UI demos, medium quality is indistinguishable from high at a third of the file size.
  4. Click Convert to MP4. ffmpeg encodes each GIF frame as a video frame, applies H.264 inter-frame compression, and wraps the result in an MP4 container. A progress bar tracks encoding.
  5. Download the MP4 using the Download MP4 button when the preview appears. The file is ready to embed with <video autoplay muted loop playsinline> or upload to any platform that accepts MP4.

Technical details

GIF stores each frame as an indexed 8-bit image with a 256-colour palette per frame (or per file for global-palette GIFs). Transparency is binary — one palette index is marked transparent, no partial alpha. LZW compression is lossless within those constraints but operates on already-downsampled colour data. The result is that a 480 × 270 px GIF at 15 fps and 10 seconds long stores roughly 150 near-full frames, typically 8–15 MB.

H.264 encodes the same clip with discrete cosine transform (DCT) compression within each frame plus inter-frame prediction between frames: only the pixel regions that actually changed are encoded, and the encoder can reference both past and future frames (B-frames) to compute the smallest possible difference. CRF (Constant Rate Factor) controls the perceptual quality target — CRF 23 is the ffmpeg default and is visually lossless for most content; CRF 28 cuts file size by roughly 40% with minor quality reduction visible only on high-motion footage. The output container is MP4 (ISO Base Media File Format), which all modern browsers and platforms accept. The pixel format is converted from the GIF's indexed palette to YUV 4:2:0, which is the standard chroma subsampling mode required for broad H.264 decoder compatibility (some decoders reject 4:4:4).

Use cases

  • Web developers optimising page load time. A landing page hero animation shipped as a 14 MB GIF is the first thing a Lighthouse audit flags. Converting to MP4 and swapping the <img> tag for a <video autoplay muted loop playsinline> element brings the asset to under 900 KB and clears the "serve images in next-gen formats" and "avoid enormous network payloads" diagnostics in one step.
  • GitHub documentation maintainers. GitHub READMEs render both GIF and MP4, but GitHub's CDN re-encodes uploaded GIFs as MP4 anyway — uploading MP4 directly skips that lossy intermediate step and keeps the colours accurate. A developer workflow demo at 640 px and 12 fps drops from 6 MB (GIF) to 380 KB (MP4).
  • Marketing teams repurposing animated assets. A design team produced an animated brand asset as a GIF for email (the only format email clients support for animation). The same file needs to go on the website and into a LinkedIn video post. Converting to MP4 gives them a version that plays natively in the LinkedIn video player and embeds cleanly in the site hero without the colour and size penalty.
  • Developers sharing demo clips in Notion and Confluence. Both platforms support embedded MP4 with native playback controls; embedded GIFs play but cannot be paused and eat bandwidth every time the page loads. An MP4 loads once, can be paused, and plays back at the correct speed without the timing-rounding artefacts that GIF's 10 ms centisecond delay resolution introduces at odd frame rates.

FAQ

Will the MP4 loop automatically like the GIF does?
The MP4 file itself does not contain a loop instruction — looping is controlled by the HTML element or player that displays it. In HTML, add the loop attribute: <video autoplay muted loop playsinline src="file.mp4">. On platforms like Twitter/X, LinkedIn, and Slack, MP4 uploads loop by default when the player detects a short clip (typically under 60 seconds). GitHub READMEs: use ![](file.mp4) — GitHub wraps it in their video player which loops short files.
The MP4 colours look different from the GIF. Why?
GIF's 256-colour palette causes colour-shift even in the original GIF — what you're seeing in the MP4 is often closer to the true source colours. If the difference is in the opposite direction (MP4 looks washed out), it is usually a colour space interpretation issue: some players interpret H.264 YUV as limited range (16–235) when the file was encoded as full range (0–255). This is correctable by re-encoding with the -color_range 1 flag in ffmpeg, but for browser playback it rarely matters as browser video renderers handle range detection automatically.
Can I convert a GIF with a transparent background?
MP4 with H.264 does not support transparency — H.264 uses YUV colour space with no alpha channel. If you need an animated transparent overlay for the web, the correct format is WebM with VP9 codec (which supports alpha) or APNG. Converting a GIF with transparency to MP4 will replace the transparent pixels with a solid fill colour (typically black or white, depending on the ffmpeg settings).
My GIF has a very fast frame rate and the MP4 looks choppy. What happened?
GIF frame timing is stored in centiseconds (hundredths of a second) — the minimum delay is 10 ms (100 fps). When ffmpeg reads the GIF frame delays and writes an MP4 at a fixed frame rate (typically 25 or 30 fps), frames with durations that do not divide evenly into that frame rate get rounded. A GIF at 33 fps becomes an MP4 at 25 fps with some dropped frames. Try re-exporting the MP4 with a frame rate that matches the source GIF's timing — if the GIF was 33 fps, set the output to 33 fps explicitly to avoid rounding artefacts.

Common use cases

  • Replace a GIF on a web page to cut load time: A product landing page embeds a 12 MB animated GIF showing a feature demo. Converting to MP4 at Medium quality produces a 1.4 MB file — a 10× size reduction. The page switches to a <video autoplay muted loop playsinline> tag. The animation looks identical to visitors but the page loads 8 seconds faster on a mobile connection.
  • Twitter/X and LinkedIn where video outperforms GIF: Twitter/X converts uploaded GIFs to MP4 internally but caps GIF uploads at 15 MB. LinkedIn recommends MP4 for animated content. A creator exporting a 20 MB screen recording GIF converts it to a 2 MB MP4 before uploading — within the platform limit and at better quality than the platform's own GIF transcoder would produce.
  • Bug reports and feature demos in GitHub and Jira: A developer captures a UI bug repro as a GIF. GitHub accepts MP4 in issue comments (via drag-and-drop) and displays it inline with playback controls; GIFs above 10 MB are rejected. Converting the repro to MP4 reduces a 14 MB GIF to 1.1 MB, well within GitHub's 10 MB attachment limit, while keeping the animation visible directly in the issue.
  • Documentation pages where GIF autoplay is too heavy: A technical writer embeds step-by-step UI screenshots as animated GIFs in a documentation site. The page weight climbs past 30 MB when several GIFs stack up. Converting each to MP4 and using the <video> tag with autoplay and muted reduces the same page to under 6 MB total with identical visual output.
  • Archiving GIF libraries in a more efficient format: A design team has 400 animated GIFs in a shared folder totalling 3.2 GB — mostly UI demos and onboarding animations from the past three years. Converting the set to MP4 at Medium quality reduces the archive to 340 MB. The originals are retained but the MP4 versions are what gets embedded in presentations, Notion pages, and the design handoff folder.

How to use it

  1. Drop your animated GIF into the converter.
  2. Choose a quality preset — Medium is recommended for most uses.
  3. Click "Convert to MP4" and wait a few seconds.
  4. Preview the result and click "Download MP4".

Frequently asked questions

Is this tool free?

Yes. Completely free, no login, no watermark, no signup required. Everything runs in your browser.

Does my GIF file upload to a server?

No. Conversion runs locally in your browser using ffmpeg.wasm — your file never leaves your device.

How much smaller will the MP4 be?

Typically 5–10× smaller than the original GIF. MP4/H.264 uses far more efficient compression than the GIF palette format.

Will the MP4 loop like the GIF does?

The MP4 file itself does not loop — loop behaviour depends on the player. Add the loop attribute to a <video> tag to make it loop in HTML.

What quality setting should I use?

Medium (CRF 23) is the best all-round choice. Use High (CRF 18) for the sharpest output; use Small file (CRF 28) to minimise file size.

My GIF loops but the MP4 only plays once. How do I fix that?

Loop behaviour in MP4 depends on the playback context, not the file. In HTML, add the loop attribute: <video autoplay muted loop playsinline src="your.mp4">. On Twitter/X, LinkedIn, and most messaging apps, short MP4s loop automatically in the feed. In a media player or file browser, single-play is the default.

Does the converter support GIFs with transparency?

H.264 MP4 does not support an alpha channel, so transparent areas in the GIF are composited against a black or white background in the output MP4. If your GIF has a transparent background that must remain transparent in the final file, consider using WebM with VP9 instead of MP4 — VP9 supports an alpha channel.

Keep going

More video tools

Other tools in the Video category on AT USE.

Live Video Tools

YouTube Thumbnail Downloader

Grab any public YouTube video thumbnail in all official sizes — instantly, no login.

Open tool
Live Video Tools

YouTube Embed Code Generator

Build privacy-friendly, responsive YouTube embed code with start/end times and player options.

Open tool
Live Video Tools

Video Aspect Ratio & Resolution Calculator

Solve width, height, or aspect ratio for any video — with presets for 16:9, 9:16 Shorts, square, and ultrawide.

Open tool
Live Video Tools

YouTube Timestamp Link Generator

Build deep links to specific moments in a YouTube video. Bulk convert chapter lists in one paste.

Open tool
Live Video Tools

YouTube Chapter Marker Generator

Format your timestamp list into a YouTube-compliant chapter description block.

Open tool
Live Video Tools

Vimeo Embed Code Generator

Generate Vimeo embed code with DNT mode, custom color, autoplay, loop, and a responsive wrapper.

Open tool