smallcord

Fit a GIF under Discord's limit

Drop a GIF — smallcord converts it to a small silent video right in your browser, or plans the smallest honest way to post it where it can't.

Your Discord tier Which one?

Convert to video in your browser new

Drop a GIF and smallcord re-encodes it to a small silent video right here on your device with WebCodecs — no upload, no ffmpeg install. The output is a video file (.mp4 or .webm), not a GIF: Discord autoplays it inline exactly like a GIF, and it’s typically 5–20× smaller. Brand new — if your browser or your file isn’t supported it says so and the command planner below still does the job.

Target: Free — 10 MB (set your tier at the top of this page)

Convert only part of it (optional) Size is bitrate × length: on a long GIF, keeping just the seconds you want is the biggest win there is. Accepts H:MM:SS, M:SS, or plain seconds.

Leave both blank to convert the whole animation — that is the default, and nothing is cut unless you type a range here. Set a start and end and only those frames are re‑encoded.

Everything runs in your browser — your files never leave your device.

Why a video, not a smaller GIF? A GIF stores every frame as a 256-color bitmap with weak compression, so it balloons. H.264 (mp4) and VP9 (webm) use motion prediction between frames, so the identical animation lands far smaller with better color. smallcord decodes your GIF frame-by-frame (keeping each frame’s timing), fits a video bitrate to your Discord limit, and hands you a real file whose byte size you can check — not a promise. The result is silent, which is exactly what a GIF is anyway.

The honest fix is a video. A GIF is a hugely inefficient way to store animation; the same clip as a silent .mp4 (or .webm) is usually 5–20× smaller, and Discord autoplays it inline exactly like a GIF — loops and all. The in-browser converter above does exactly that on your device with WebCodecs where your browser supports it. We do not ship the ffmpeg-WebAssembly transcoders (every ready-made build is GPL / non-redistributable — see below), so when the converter can't run, this planner also computes the exact settings and hands you a one-line command to run locally. A keep-it-a-GIF fallback is offered too.

GIF fit planner

Your Discord tier is set at the top of this page — the planner below and the in-browser tool share it.

No file handy? Type the GIF’s details — same planner, nothing is read from any file.
Trim to a clip (optional) Keep only part of the GIF — fewer frames is the biggest size win. Accepts H:MM:SS, M:SS, or plain seconds (e.g. 1:30 or 90).

Optional. Accepts H:MM:SS, M:SS, or plain seconds (e.g. 1:30 or 90). Leave blank to plan the whole GIF.

Drop a GIF above or click to choose one. It is read and measured on your own device — nothing is uploaded.
Get ffmpeg — install it on Windows, macOS, or Linux

Windows: if winget is available (it is on most current Windows 10/11 systems), open a terminal — PowerShell or Command Prompt — and run winget install ffmpeg. Otherwise download a Windows build linked from the official ffmpeg.org downloads page, unzip it, and add its bin folder to your PATH — then open a new terminal so the change takes effect.

macOS: with Homebrew installed, run brew install ffmpeg in Terminal. No Homebrew? The ffmpeg.org downloads page links macOS builds too.

Linux: use your distro's package manager — sudo apt install ffmpeg on Debian/Ubuntu, sudo dnf install ffmpeg on Fedora. Honest note: some distros ship the full ffmpeg from a third-party repo (Fedora's full build comes from RPM Fusion, for example), so the one-liner may need that repo enabled first — your distro's docs will say.

Check it worked: run ffmpeg -version. If it prints a version banner, you're set — come back and copy the MP4 (or keep-it-a-GIF) command the planner gives you above.

Everything runs in your browser — your files never leave your device.

How the planner works

1

Pick your tier

10 MB (free), 50 MB (Nitro Basic), or 500 MB (Nitro) — match the account you'll upload from.

2

Drop your GIF

Your browser reads its size, dimensions and frame count straight from the file — no upload — and works out the fit.

3

Run the command

Copy or download the ready-made ffmpeg line — MP4 (recommended) or a smaller GIF — then upload the result.

Why an MP4 beats a "smaller GIF"

A GIF stores every frame as a palette-indexed bitmap with only lightweight LZW compression and a maximum of 256 colors. That's why GIFs balloon: a few seconds of motion can be tens of megabytes. H.264 (the codec inside a normal .mp4) uses motion prediction between frames and proper compression, so the identical animation routinely lands 5–20× smaller with better color. Discord treats a small, silent, looping MP4 exactly like a GIF — it autoplays inline, loops, and needs no click. smallcord reads your GIF's real dimensions and frame count, then the same planGif math that's unit-tested in this repo works out a video bitrate that should land under your tier's cap (with ~3% container headroom) and gives you the ffmpeg command.

Honest limits: this is a planning estimate, not a byte-exact promise. Real encoders hit a target average bitrate with tolerance, and how well a clip compresses depends on its motion and detail. If the MP4 lands slightly over, drop the bitrate ~5% and re-run. The keep-it-a-GIF fallback (scale down, fewer frames, smaller palette) is even rougher — GIF size swings 2–3× with content — so it's there for when you genuinely need a .gif, with the tradeoff spelled out. If even the MP4 route can't fit a very long clip, the tool says so plainly instead of guessing — and it now offers the lever that moves the number fastest, length. Size is bitrate × duration, so halving the clip roughly doubles the bitrate you can afford: the converter above has optional start/end boxes that convert only the span you pick, and the ffmpeg commands below take the same range as -ss/-t. Trimming is not a guarantee either — a span can still be too long for a small tier, and when it is, the estimate under the boxes says “still over” with the number, rather than promising a fit.

Tight fit? Use two-pass. The MP4 block has a two-pass encode checkbox (single pass is the default). Two-pass runs ffmpeg twice with identical bitrate numbers: pass 1 analyzes the whole animation and writes only a stats log — its output goes to the null device (/dev/null on macOS/Linux, NUL on Windows) — then pass 2 encodes using that analysis, so the average bitrate lands notably closer to the target. The cost is roughly double the encode time, and even two-pass does not guarantee a byte-exact size — no encoder can. It applies only to the MP4 route; the keep-it-a-GIF command has no bitrate to steer. Pass 1 also leaves a small ffmpeg2pass-0.log file you can delete afterwards.

Questions

Is my GIF uploaded anywhere?

No. This page reads the file's bytes on your own device — parsing the GIF header for its width, height and frame count — and does all the planning locally. There is no server to receive it; you can confirm in your browser's Network tab that choosing a file makes zero requests. The actual transcode also runs on your machine, via the command we give you.

Wait, the output is an MP4, not a tiny GIF?

Right — and that's on purpose. There is no honest way to make a GIF "magically tiny"; the format itself is the problem. Converting to a silent H.264 MP4 is how you actually get a small file that still animates. Discord plays that MP4 inline just like a GIF: it autoplays, loops, and no one has to click it. If you truly need a real .gif (for somewhere that only accepts GIFs), use the "keep it a GIF" fallback the tool shows — it shrinks by scaling down, dropping frames and cutting colors, with visible quality loss.

Can smallcord convert it in the browser?

Yes — the converter at the top of this page does it locally using your browser's built-in WebCodecs: it decodes the GIF frame-by-frame with ImageDecoder and re-encodes to a silent MP4 (H.264) or WebM (VP9) with a permissively licensed (MIT) muxer, entirely on your device. What smallcord does not ship is ffmpeg compiled to WebAssembly — every ready-made build of that engine bundles GPL-licensed encoders (libx264/libx265) or is marked non-redistributable, which doesn't fit this project's licensing. So on browsers without WebCodecs video encoding (some Linux builds have no H.264 or VP9 encoder), the converter says so plainly and this planner hands you a one-line local command instead — the reliable path that works everywhere.

I don't have ffmpeg. What's the easiest way?

Install ffmpeg — the Get ffmpeg section in the planner above has per-OS steps (winget, Homebrew, or your distro's package manager) — then paste the command the planner gives you into a terminal in the folder with your GIF, or use the Download .sh button and run the saved script. Prefer a window with buttons? HandBrake (handbrake.fr, free) can open a GIF and export an MP4 — set the average video bitrate to the number smallcord shows.

The MP4 came out a little over the limit — now what?

That's normal: encoders aim for an average bitrate and overshoot slightly on busy footage. Lower the video bitrate by roughly 5% and re-encode, or trim a few frames off the clip. Reducing the resolution or frame rate also helps a lot.

Can I choose the frame rate?

Yes. By default smallcord picks the frame rate automatically — the clip's own rate, capped at 30 fps for the MP4 route and no lower than 10 fps. Once a plan is shown, a Frame rate dropdown lets you pick a value within that honest range instead. The two routes react differently, on purpose. For the MP4, size is set by the bitrate, so the fps only changes how the motion is spread across frames — the target size is the same. For the keep-it-a-GIF route it's a real tradeoff: a GIF's size is roughly width × height × frames, so choosing a higher fps forces a smaller frame size to stay under your limit, and a lower fps lets it stay larger. The planner solves that with the same math it uses everywhere, so the size estimate and the fps= value in the command always agree. Pick something outside the range (say, via a shared ?fps= link) and it's clamped to the nearest allowed value and told you so — never silently.

More smallcord tools

Got a different file? Fit a video (MP4/MOV/WebM) plans a target bitrate the same way, and fit an image re-encodes a PNG or JPEG fully in your browser to slip under the same Discord caps. One thing this page can never give you back is sound: a GIF has no audio track at all, and the MP4 it hands you is silent by design. If the thing you need to post is the sound — a clip’s soundtrack, a voice memo, a song — fit an audio file runs the same budget arithmetic against duration alone.