Convert GIF to JPG
A GIF stores at most 256 chosen colors and possibly hundreds of frames. A JPEG stores millions of colors and exactly one frame. Going from one to the other is not a format change so much as two conversions in opposite directions, and both of them lose something.
Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.
Add to Chrome — freeDrop your GIF file here, or click to browse
Up to 50 MB. Deleted automatically after 30 minutes.
What it does
- The first frame, extracted deliberately rather than by accident
- Transparent areas filled with white, not black
- Typically a very large size reduction from an animated source
- No watermark and no sign-up
How to use GIF to JPG
- 1
Add the GIF
Animated or still, from a chat export, a screen recording, or a page you saved. Large animations are fine; only one frame of them is read.
- 2
Convert
The first frame is decoded, any transparency is composited onto white, and the result is encoded as a JPEG at quality 82.
- 3
Look at the flat areas
This is where the two formats disagree most. Skies, solid backgrounds and dithered gradients are where you will see whether the result is good enough, not the detailed parts.
How it works
The first frame of the GIF is decoded into full-color pixels, any transparency is composited onto white, and those pixels are encoded as a JPEG.
The frame is pinned explicitly rather than left to the decoder. Handed a
multi-frame file and asked for a single-image format, some image tools write
out-0.jpg, out-1.jpg, out-2.jpg and report success — leaving nothing at the
name you asked for. Naming the frame up front is what makes the result
predictable.
Two lossy steps, pointing opposite ways
GIF is a palette format. Every pixel is an index into a table of at most 256 colors, and getting a photograph into that table means throwing away almost every color it had, usually with dithering to disguise the loss.
JPEG is a continuous-tone format. It assumes smooth gradients and small differences between neighboring pixels, and it compresses by discarding detail the eye is bad at noticing.
Put them in series and each one's output is the other's worst input. A test animation whose first frame contained exactly 256 distinct colors produced a JPEG containing 70,422 — the encoder inventing thousands of intermediate values along every hard palette boundary, because a hard boundary is the one thing its maths cannot represent cheaply.
What that means in practice
Photographs trapped in GIF convert well. They were continuous-tone images before something palettised them, and JPEG is the format they should have been in. The banding the palette introduced stays, but nothing new goes wrong.
Dithered images convert badly. The speckle pattern reads as detail. JPEG either spends a lot of bits keeping it or blurs it into mottling, and neither is what you wanted.
Flat graphics convert pointlessly. Solid-color logos, diagrams and pixel art are the case GIF was actually good at. Sending them through JPEG adds ringing around every edge and often makes the file bigger.
When PNG is the better target
If the source is a still image and you are converting for compatibility rather than for size, PNG is almost always the right answer: it keeps the exact pixels, keeps the transparency, and is accepted everywhere JPEG is.
The case for JPEG is size, and it is a real case — a link preview, an email attachment, a thumbnail grid where fifty images load at once. Choose it when the number of bytes is the thing you are solving for, and choose PNG when it is not.
Examples
A 24-frame screen recording
Fifty-nine times smaller, and twenty-three frames poorer. That trade is worth it for a thumbnail or a link preview and is a mistake for anything where the motion was the content. Measured on a real file rather than estimated.
A logo saved as a transparent GIF
The transparency has to become a color, because JPEG has no alpha channel at all. White is the default here. If the badge is going onto a colored page it will now sit in a white rectangle, and PNG is the target you actually wanted.
Frequently asked questions
Which frame do I get from an animation?
The first one, always. There is no frame picker, because a JPEG holds exactly one image and any other choice would need you to scrub through the animation to make it. If the frame you want is not the first, open the GIF in an image editor that shows the frame list and export the one you want from there.
Why did my sharp graphic come out mottled?
Because the two formats fail in opposite directions. GIF reduced your image to 256 colors and probably dithered it — scattering pixels of two palette colors to fake a third. JPEG then treats that deliberate speckle as fine detail worth preserving and spends bits smearing it, which is exactly what it should never do. Flat graphics belong in PNG.
Does converting make the file smaller?
From an animation, dramatically — you are discarding every frame but one. From a single-frame GIF the answer depends on the picture: a photograph shrinks substantially, while a flat logo or a screenshot of text may actually grow, because JPEG is built for photographs and spends bits on edges that a palette stored almost for free.
What happens to the transparent parts?
They are filled with white before encoding. JPEG has nowhere to store transparency, so it has to become some color, and the default matters more than it sounds — an unfilled transparent pixel encodes as black, which is why logos converted with careless tools arrive on a black rectangle. If you need another background color, composite it in an editor first.
Further reading
- The Same Clip Was Four Times Bigger as a GIF, at Fewer FramesConverting a video to a GIF feels like a downgrade, so the file should get smaller. It gets much bigger. The clip we measured quadrupled while losing four frames in every ten, and the reason is that a GIF has no idea what a video codec knows.
- GIF Was Perfect on a Page of Text and Ruined the PhotographGIF is usually described as a lossy format, or at least as one that ruins images. That is not quite right. GIF's compression is lossless; what it cannot do is hold more than 256 colors. On an image that already has fewer than that, GIF is perfect. On a photograph it is a disaster. The same format, two completely different outcomes.