First: three rules for tolerable GIF sizes

Whatever the method, these three levers decide the file size long before any compressor can rescue it:

  • Keep it short: 2–6 seconds. Each extra second costs megabytes, roughly linearly.
  • Scale it down: 480 px wide as a default, 320 px for chat reactions.
  • Lower the frame rate: 10–15 fps. GIFs live on the gesture, not on buttery smoothness.

Way 1: built-in tools

For: a quick one-off GIF for chat, no installation.
On iPhone, the Shortcuts app can turn any video into a GIF (a "Convert video to GIF" shortcut). On Android, Google Photos sometimes offers GIF creation under "Tools"; the official GIPHY apps work on both. Limits: little control over frame rate and size — running the result through a GIF compressor afterward almost always pays off.

Way 2: screen recording straight to GIF

For: software demos, bug reports, README animations.
Instead of recording a video and then converting, tools like Kap (macOS, open source) or ScreenToGif (Windows, open source) record a screen region directly as a GIF, with trimming and frame-rate control built in.

Way 3: ffmpeg — maximum control, best quality

For: anyone comfortable with the command line who wants the best quality-to-size ratio. The pro trick is a custom palette: GIF is limited to 256 colors, and ffmpeg picks them per clip with palettegen instead of using a generic set:

ffmpeg -i clip.mp4 -vf "fps=12,scale=480:-1:flags=lanczos,palettegen" palette.png
ffmpeg -i clip.mp4 -i palette.png -filter_complex "fps=12,scale=480:-1:flags=lanczos[x];[x][1:v]paletteuse" out.gif

The result is visibly cleaner (no banding in gradients) and usually 30–50% smaller than a one-step export.

Way 4: browser tools

For: occasional use on the desktop, no installation. Two kinds exist: services that upload your video (the wrong choice for private clips) and browser-local WebAssembly-based converters where the file stays on your machine. Check the privacy note before using one — "processed in the browser" is the phrase to look for.

The honest question: does it have to be a GIF?

GIF is technically obsolete as a moving-image format; it survives because it plays everywhere without a player and loops automatically. But depending on the goal, there are better options:

GoalBest choice
Chat / messengerGIF (plays inline everywhere)
GitHub READMEGIF (auto-plays in READMEs)
Your own websitemuted auto-play MP4/WebM (up to 90% smaller)
Website, image pipelineanimated WebP (smaller, more colors)
EmailGIF (video barely supported in mail)

On your own site, a <video autoplay muted loop playsinline> element is almost always the better answer than a mega-GIF — same effect, a fraction of the load time.