Free tool · real .gif output · public posts

Twitter GIF Downloader

Paste a link to an X (Twitter) post with a GIF. X stores every GIF as a looping MP4 video, so this tool rebuilds a real .gif file from it, right in your browser, at the width and frame rate you pick. You can also save the original MP4.

Public posts only. Download only media you own or have permission to use.

How to download a GIF from X

  1. On the post, tap Share → Copy link. Links from x.com, twitter.com, mobile.twitter.com, fxtwitter and vxtwitter all work, and so does a bare post ID.
  2. Paste it above and press Get media.
  3. Choose a width and frame rate, press Convert to .gif, then Download .gif. A short clip takes a few seconds; the progress shows on the button.

What X actually stores for a GIF

We pulled 52 recent GIF posts through our own API and checked the files X serves for them. Every one was a single silent MP4. Unlike regular videos, which come in a ladder of resolutions, a GIF gets exactly one file, at roughly the size it was uploaded:

Files X serves for 52 sampled GIF posts
MeasuredMedianRange
MP4 files per GIF11 in all 52
File size84 KB26 KB to 1.3 MB
Width457 px200 to 1,254 px

Source: posts matching gif filter:media min_faves:20, media fields read with the TwitterAPI.io search endpoint, sizes from the CDN's Content-Length header.

So “HD” GIF downloads don't exist: there is no higher-quality copy on X's servers than the one MP4. The .gif this tool makes can match its width at most, never exceed it.

.gif or MP4: which one to save

When to keep the .gif and when the MP4
Compared on.gif (converted here)MP4 (X's original)
File size5× to 73× larger in our tests (below)Smallest
Image quality256 colours per frame, slight banding on gradientsExactly as X stores it
Loops and plays on its own inGitHub READMEs, Markdown docs, many email clients, image-only fields, slide decksChat apps and sites that accept video uploads
Re-posting to XWorks; X converts it to MP4 againPosts as a video, not as a GIF

How big the .gif gets: measured

We ran three real GIF posts through this tool's converter (the same code that runs on this page) at four settings. The number of frames is seconds × frames per second, and every frame is stored whole, so both settings matter:

Converted .gif size for three X GIFs at four settings
Source MP4480 px · 15 fps320 px · 15 fps480 px · 10 fps240 px · 10 fps
438×390, 1.9 s, 121 KB2.9 MB*1.7 MB1.8 MB*0.7 MB
394×432, 1.3 s, 50 KB0.8 MB*0.6 MB0.5 MB*0.2 MB
960×1280, 3.0 s, 50 KB3.6 MB1.8 MB2.4 MB0.8 MB

* Source narrower than 480 px, so the GIF keeps the source width. Measured in Chrome on a desktop; sizes depend on the clip's colours and motion.

Picking the settings: 320 px at 15 fps is the default and keeps a few-second clip around 1 to 2 MB. Going from 15 to 10 fps saves about a third; 240 px at 10 fps is the lightest and fits the tightest upload limits. Use 480 px only when sharpness matters more than size. Clips longer than 15 seconds are cut at 15 seconds.

Downloading GIFs from many posts: use the API

For saving a whole thread, an account's reaction GIFs or a dataset, read the media fields yourself. The /twitter/tweets endpoint takes many post IDs per call; GIFs show up with type: "animated_gif" and one MP4 URL:

import requests

r = requests.get(
    "https://api.twitterapi.io/twitter/tweets",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"tweet_ids": "2118271153269838147,2118270104266027389"},
    timeout=20,
)
for t in r.json().get("tweets", []):
    for m in (t.get("extendedEntities") or {}).get("media", []):
        if m.get("type") == "animated_gif":
            mp4 = m["video_info"]["variants"][0]["url"]
            print(t["id"], mp4)

Convert the MP4s to .gif locally with any tool you like, for example ffmpeg -i in.mp4 -vf "fps=15,scale=480:-1" out.gif. Cost for 10,000 posts: $1.50 on TwitterAPI.io at $0.15 per 1,000 posts (pricing), against $50 on X's pay-per-use API at $0.005 per post read (docs.x.com, prices subject to change), about 33× more.

Need GIFs at scale? Get an API key

Questions

Why does X turn GIFs into MP4 files?
When you post a GIF, X re-encodes it as a silent MP4 video that loops. A video codec compresses motion far better than the GIF format, so the file is much smaller and loads faster in the timeline. The original .gif is not kept, which is why other downloaders hand you an MP4.
Is my GIF uploaded to your server?
No. Your browser downloads the MP4 straight from X's media server, draws its frames on a canvas and encodes the .gif on your device. We only look up which media the post contains; the file itself never passes through our servers.
Why is the .gif bigger than the MP4?
GIF is a 1980s image format: it stores up to 256 colours per frame and compresses each frame on its own, with no motion prediction. In our tests on three real X GIFs, the .gif came out 5 to 73 times larger than the MP4, depending on the settings. Lower the width or frames per second for a lighter file, or keep the MP4 if the app you're sharing to plays video.
Can I download GIFs from private accounts?
No. The tool only reads public posts. Posts from protected accounts, and deleted posts, return a not-found message.
How many GIFs can I download?
20 posts per day without an account, 100 per day if you sign in with Google. Converting to .gif doesn't count against that; it happens in your browser. For bulk work, use the API described below.

Copyright and takedowns

This tool doesn't host, copy or store any media. The .gif is made on your own device from the file on X's servers, for public posts only. GIFs belong to their creators: download only content you own or have permission to use. Rights holders can send a removal or blocking request to hello@twitterapi.io. TwitterAPI.io is an independent service, not affiliated with X Corp.

Related