Home › Audio & Video › MP4 to GIF

MP4 to GIF

Turn any short MP4, MOV or WebM clip into a crisp animated GIF. Trim the exact moment, choose the frame rate, width, colors, dithering and loop count, see an estimated file size before you convert, and download a GIF with no watermark. Your video never leaves your device.

Last updated:

Advertisement
Advertisement

How to use the MP4 to GIF

  1. Choose a video by dropping it on the box or clicking to browse.
  2. Trim the clip: type start and end times, or play the video and press Set to now. Press Play selection to check it.
  3. Pick the GIF settings: frame rate, width, colors, dithering, loop and speed. The estimated size updates as you change them.
  4. Press Convert to GIF and wait for the progress bar. The first ffmpeg run downloads the encoder once.
  5. Press Download GIF, or Change settings to try a smaller or smoother version.

How the high-quality GIF conversion works

The Best quality encoder runs the same two-step method that video professionals use with ffmpeg on the command line. First palettegen scans every frame of your trimmed clip and builds the 256 (or fewer) colors that represent it best. Then paletteuse maps each frame to that palette with the dithering you chose and stores only the rectangle that changed since the previous frame. The filter chain looks like this:

fps=12,scale=480:-2:flags=lanczos,split[a][b];[a]palettegen=max_colors=256[p];[b][p]paletteuse=dither=sierra2_4a:diff_mode=rectangle

Without a custom palette, a GIF falls back to a generic one and skin tones, skies and gradients turn blotchy. Lanczos scaling keeps the picture sharp when you make it smaller.

Why width, fps and length matter so much

Before compression, a GIF frame stores one byte (a palette index) per pixel, so the raw size is width × height × frames bytes, where frames = seconds × fps ÷ speed. LZW compression and storing only the changed rectangle of each frame shrink this, but the raw number shows how quickly a GIF grows. Example for a 5 second 16:9 clip:

SizePixels per frameRaw data at 10 fps (50 frames)Raw data at 15 fps (75 frames)Raw data at 25 fps (125 frames)
320 × 18057,6002.9 MB4.3 MB7.2 MB
480 × 270129,6006.5 MB9.7 MB16.2 MB
640 × 360230,40011.5 MB17.3 MB28.8 MB

Doubling the width quadruples the pixels; doubling the frame rate doubles the frames. The size estimate above the Convert button encodes real frames of your clip, so use it to compare settings.

Tips for small, sharp GIFs

  • Trim hard. Length is the biggest factor: a 3 second loop is often all you need.
  • Lower the frame rate before the width. Going from 24 to 12 fps halves the frames, and most viewers barely notice.
  • Use "Moving parts" for screen recordings and clips with a still background, so the palette is spent on what changes.
  • Choose None or Bayer dithering for flat graphics; error-diffusion dithering adds noise that compresses poorly.
  • Check upload limits: many chat apps and forums limit GIFs to between 8 and 15 MB.

Frequently asked questions

How do I convert an MP4 to a GIF without losing quality?

A GIF can only hold 256 colors per frame, so some loss is unavoidable, but you can keep it small. Use the Best quality encoder, which builds a custom palette for your clip with ffmpeg's palettegen and maps every frame to it with paletteuse, keep 256 colors and Sierra dithering, and use a width of 480 to 640 px at 12 to 15 fps.

Why is my GIF so much bigger than the MP4?

MP4 uses modern video compression that predicts each frame from the previous ones and stores only the differences very efficiently. GIF uses simple LZW compression of 8-bit indexed pixels, so the same clip is usually many times larger as a GIF. Every pixel of width, every extra frame per second and every extra second adds to the size.

What frame rate and width should I use?

10 to 15 fps looks smooth for most clips and keeps the file small. Use 20 to 30 fps only for fast motion. For chat apps and websites 480 px wide is a good default; 320 px is enough for reaction GIFs, and 640 to 800 px for detailed screen recordings.

What does dithering do?

Dithering mixes nearby palette colors in a fine pattern to fake colors the 256-color palette doesn't have, which avoids ugly banding in gradients and skies. Sierra and Floyd–Steinberg spread the color error to neighbouring pixels and look smoothest. Bayer uses a fixed grid pattern that compresses better. None gives flat color areas and the smallest files for cartoons and screen recordings.

How accurate is the size estimate?

It encodes a few real frames from the middle of your clip at the chosen settings and scales the result to the full number of frames, so it is usually within about 20 to 30%. Clips where the amount of motion changes a lot, or the ffmpeg encoder's different palette, can make the final file smaller or larger.

Is there a length limit?

Up to 1,500 frames per GIF, for example 100 seconds at 15 fps. In practice GIFs longer than 10 to 15 seconds become very large; for longer clips an MP4 or WebM is a much better choice.

Is my video uploaded to a server?

No. The video is decoded and the GIF is encoded inside your browser, either by ffmpeg compiled to WebAssembly or by the built-in encoder. Only the encoder program itself is downloaded from a public CDN the first time; your file never leaves your device.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

GIF to MP4Convert animated GIFs to MP4 video with loops, scaling and background color, in your browser.Video TrimmerCut the start and end off a video on a visual timeline and save the clip as WebM.Video CompressorCompress videos in your browser: pick a quality and resolution to shrink the file size.Video to Frames ExtractorExtract still frames from a video every few seconds or every Nth frame, as JPG or ZIP.Flipbook Animation MakerDraw frame-by-frame animations with onion skin and FPS control; export GIF, video or sprite sheet.Slow Motion Video MakerMake smooth slow motion (0.1x-0.75x) with frame interpolation or blending on any part of a video.Video Meme GeneratorAdd a white caption bar or classic top and bottom meme text to a video or GIF.WEBP to GIFConvert animated or still WebP images to GIF, keeping every frame delay, with loop and size options.Video to MP3Extract the audio from a video as MP3.MKV to MP4Convert MKV to MP4 in seconds by copying H.264/AAC streams, or re-encode with ffmpeg.Webcam Video RecorderRecord video from your webcam and mic, then download it.Subtitle EditorEdit, shift and convert SRT and VTT subtitles.Video Speed ChangerSpeed up a video or make slow motion from 0.25× to 4×, with audio, and save it as WebM.Mute VideoRemove the sound from a video and save a silent copy as WebM, right in your browser.Rotate VideoRotate a video 90° or 180°, or mirror it, with sound, and save the fixed copy as WebM.SRT Time CalculatorShift subtitle timing, convert SRT frame rates, sync by two points and fix broken SRT files.Video Resolution CheckerCheck a video's resolution, length, frame rate, bitrate and codecs without uploading it.Video File Size CalculatorEstimate video file size from resolution, fps, bitrate and length, or the bitrate for a size limit.Vocal RemoverRemove vocals from a song to make a karaoke instrumental, or pull out an acapella, in your browser.Video CropperCrop a video to 1:1, 9:16, 16:9 or any area by dragging a box, with sound. Saves MP4 or WebM.Video ConverterConvert videos to MP4 or WebM with your choice of resolution, frame rate and bitrate.Video MergerJoin several video clips into one MP4 or WebM in any order, with trimming and fades.MOV to MP4Convert MOV to MP4 instantly with no quality loss, or re-encode to H.264. No upload.WebM to MP4Convert WebM videos to MP4 (H.264) with your choice of resolution and quality. No upload.WebM to MP3Extract the audio from WebM video or audio files and save it as MP3. Free, no upload.Add Audio to VideoAdd music or a voice-over to a video: replace or mix the sound, set offset, volume and fades.Video ReverserPlay a video backwards: reverse a clip with or without reversed sound, or make a boomerang loop.Silence RemoverFind and cut long pauses and dead air in recordings, podcasts and voice memos automatically.Add Subtitles to VideoBurn SRT or VTT subtitles into a video with your own font, color, outline and position.Add Watermark to VideoPut a text or logo watermark on any video, set position, size and opacity, then save it.Video Thumbnail GeneratorGrab thumbnails from a video at any time or make a contact sheet grid. JPG, PNG or ZIP.Slideshow MakerTurn photos into a video slideshow with transitions, captions and music. Saves MP4 or WebM.Add Text to VideoPut titles and captions on a video with your font, colour, position, timing and fade. No upload.Audio Visualizer Video MakerMake an audiogram: cover image plus animated bars or waveform synced to your audio, as MP4/WebM.AVI to MP4Convert AVI videos (Xvid, DivX, MJPEG) to H.264 MP4 in your browser, several files at once.Flip VideoMirror a video horizontally or vertically, fix selfie videos and save MP4 or WebM with sound.Frame by Frame Video PlayerStep through a video one frame at a time with frame number, timecode, slow motion and PNG export.Landscape to Vertical VideoTurn a 16:9 video into 9:16 for Shorts, Reels and TikTok with a blurred background fill.Video SplitterSplit a video into equal parts, 15/30/60-second clips for Stories, or at your own cut points.Video Volume BoosterMake a quiet video louder (up to 400%) or quieter, with a limiter that stops clipping.Webcam Photo BoothSnap webcam photos with a countdown, filters and frames, then download a photo strip.Auto Subtitle GeneratorGenerate SRT and VTT subtitles from any video with in-browser Whisper, then edit timing and text.Blur VideoBlur or pixelate faces, plates and text in a video, with moving areas and automatic face blur.Compress Video to 25MBShrink any video to fit under 25 MB: target bitrate computed from its length, encoded in your browser.Green Screen Video EditorRemove a green or blue screen from a video and put in a new image, color or video background.MOV to MP3Extract the audio from MOV videos to MP3 at 128-320 kbps, with optional trim. Batch + ZIP, no upload.MP3 to MP4Turn an MP3 or WAV into an MP4 video with a cover image, title and waveform for YouTube.MP4 to WebMConvert MP4 video to WebM (VP9 or VP8 with Opus audio) with a quality slider. Runs locally, no upload.Online Video EditorEdit videos in your browser: trim, split, arrange clips, add text, music and transitions, export MP4.Remove Background Noise from VideoClean hiss, hum and room noise from a video's sound and keep the picture untouched.SRT to VTTConvert SRT subtitles to WebVTT for HTML5 video, with cue settings, preview and batch ZIP.Video Background RemoverRemove the background behind a person in a video with AI; make it transparent or swap in a color, image or blur.VTT to SRTConvert WebVTT subtitles to SRT: strips styles and notes, renumbers cues, batch ZIP.WMV to MP4Convert Windows Media WMV videos to H.264 MP4 in your browser, with quality and size control.360 Video ViewerWatch local 360° and VR videos or photos: drag, tilt or zoom to look around, 3D and fullscreen.Animated Captions for VideoBurn word-by-word animated captions (highlight, pop, karaoke) onto video from Whisper or SRT.Auto Reframe VideoTurn horizontal video into vertical 9:16 that automatically follows faces and subjects.Beat Sync Video EditorAuto-cut your clips and photos to the beat of a song and export a music-synced MP4 montage.Boomerang Video MakerMake a forward-backward looping boomerang clip from a video or webcam burst as MP4 or GIF.Brighten VideoFix dark videos: exposure, gamma, shadows lift, auto-levels and low-light denoise, save MP4.Lyric Video MakerMake a lyric video: add a song and background, tap to sync lines or import LRC, export 16:9 or 9:16.M3U8 PlayerPlay HLS .m3u8 streams in your browser, switch quality and inspect bitrate, segments and codecs.Picture in Picture Video MakerOverlay a small video on top of another, drag and resize it, round or circle it, and save MP4.Playlist Duration CalculatorAdd up track or video lengths to get the total playlist or album length and average track.Screen to GIF RecorderRecord your screen, a window or a tab and turn it straight into an optimized GIF.Square Video MakerFit any video into a 1:1 square without cropping, with blurred, color or image fill.Stop Motion MakerMake stop-motion animation with your webcam: onion skin, reorder frames, add music, save MP4 or GIF.Streaming Data Usage CalculatorEstimate GB used by video, music and video calls per day and month, and check it against a data cap.
See all 94 Video Converters & Editors →