GIF to JPG Converter

What this conversion always does
  • Writing the JPG discards picture detail to save space, and what it discards does not come back.
  • Transparent areas are laid onto #FFFFFF, because JPG carries no alpha channel here.
  • The Exif data, the colour profile and anything else the original carried are not passed on: the picture is decoded to plain pixels and a new file is written from them.
And what it does if your file has it
  • An animated GIF comes through as its first frame. The frames after it are not converted.
What this page reads and writes
  • Reads the first frame of an animated GIF only, and tells you how many frames it left out.

0.9

Needs JavaScript. Runs only here.

Swap to JPG to GIF

This page turns a GIF into a JPG on your own machine. Every conversion on this page runs in your browser. The picture is read, drawn and written on your own machine, and the file is not sent to a server.

Going the other way? Convert JPG back to GIF

How do you convert a GIF to a JPG?

A JPG holds one opaque picture, compressed with loss. Writing a GIF as a JPG takes its first frame, fills its clear pixels with a colour and lets JPEG compression thin the detail.

In short

A GIF converted to JPG becomes one still, opaque picture: its first frame, with clear pixels filled in a background colour you choose. JPEG compression then discards some detail, and the quality setting decides how much.

  1. Choose the GIF file you want to convert. It is read inside this page, on your own machine.
  2. Pick the colour that goes behind the clear areas. This page starts at #FFFFFF and states the colour it used, because the browser's own default would fill them with black.
  3. Set the quality between 0 and 1. A lower setting writes a smaller file and throws more detail away, and no two browsers read the number the same way.
  4. Select Convert to JPG. The page reads the first bytes of what came back and refuses the file if they are not JPG.
  5. Download the JPG. If the GIF was animated, the page has told you how many frames it left out, because the JPG holds the first one only.

GIF to JPG gives one opaque frame at a smaller size, and the image file converter shows which other format would keep the clear areas instead.

What Changes From GIF to JPG

GIF to JPG writes the first frame as a JPEG. The clear pixels are filled with a background colour, JPEG compression discards detail according to the quality setting, and the frames after the first are not converted.

Each row below is one property of the picture: what it is in the GIF, what it becomes in the JPG, and whether it survives the trip. Convert a file and the same rows fill in with the measurements from your own picture.

What Changes From GIF to JPG
Property In the GIF In the JPG Verdict
Dimensions as the file has them as the file has them kept
Colour model and bit depth palette indices, at most 256 colours Y'CbCr, 8 bits per channel — 8 bits per sample, whatever the source held changed
Alpha channel present flattened onto #FFFFFF lost
Colours used at most 256 the same colours kept
Animation frames 1, or several — GIF can carry an animation 1 — the first frame changed
Metadata (Exif, ICC) present in the file dropped — a new file is written from pixels lost
Compression variable-length-code LZW over palette indices lossy, discrete cosine transform (the baseline process) changed
File size the file you chose depends on the picture — both sizes print once you convert changed

the pixels survive; some of the detail, the transparency and the Exif data do not.

Going Back to GIF

Converting back does not restore what this step dropped, so convert the JPG result back to GIF only when you need a GIF file.

The change above runs one way — go back from JPG to GIF writes a new file, not the original.

What Travels With the Picture

What the two formats are, and what the browser does with a picture on the way between them. None of this depends on which GIF you bring.

How GIF and JPG Are Defined

How GIF and JPG Are Defined
Property GIFJPG
Compression variable-length-code LZW over palette indices; the coding step is exactly invertible, so nothing is lost after the picture has been reduced to the palettelossy, discrete cosine transform (the baseline sequential process); the standard also defines a separate lossless mode that web .jpg files do not use
Alpha channel none - one palette entry may be marked transparent and is skipped when drawnnone - neither T.81 nor JFIF defines an alpha or transparency channel
Animation yes - several images in one data stream, each preceded by a Graphic Control Extension whose Delay Time is in hundredths of a second. Looping is not part of the specification.none - one image per file
In one sentence A GIF draws every pixel from a colour table of at most 256 entries. Transparency is one of those entries marked clear, so a pixel is either wholly transparent or wholly opaque.JPEG saves space by throwing detail away. The baseline process, which is what a .jpg file on the web uses, is lossy and cannot be undone, and the standard defines no transparency at all.
  • A GIF file begins 47 49 46 38 39 61 ("GIF89a") or 47 49 46 38 37 61 ("GIF87a").
  • A JPG file begins FF D8 (SOI); a JFIF file follows it with FF E0 and the identifier 4A 46 49 46 00.
  • GIF is defined by Graphics Interchange Format Version 89a (CompuServe, 1990).
  • JPEG is defined by ITU-T Rec. T.81 | ISO/IEC 10918-1 (JPEG); ITU-T Rec. T.871 | ISO/IEC 10918-5 (JFIF).

JPEG and lossy WebP save space by discarding picture detail, and what they discard does not come back. PNG, BMP and lossless WebP keep every pixel they are given, and GIF keeps every pixel it is left with after the palette has been applied.

PNG, GIF, WebP and ICO can carry transparency; JPEG cannot, because the standard defines no alpha channel, and a bitmap written here is opaque. Converting to a format without transparency fills the clear areas with a background colour.

Drawing an animated GIF or WebP takes a single picture from it - the image the format names as its default, or the first frame where there is none - so the converted file holds one picture and not the animation.

Converting a picture back to the format it came from does not return the original file. Whatever a step discarded stays discarded, and the return trip writes a third file.

The browser decodes the picture to plain pixels and writes a new file from them, so the Exif data, the colour profile and anything else the original carried are not passed on.

Drawing an animated image onto a canvas uses the image the format names as its default, or the first frame where the format names none. The other frames are not reachable this way.

When a canvas is written to a format that has no alpha channel, the browser lays the picture over opaque black. A converter that wants any other background has to paint it first, and should say which colour it used.

The quality setting applies only to formats that support variable quality, never to PNG, and it has to be a number between 0 and 1. Browsers read it differently, so the same setting does not give the same file everywhere.

From an animated GIF this site converts the first frame only. The browser hands a page one picture, and a GIF names no default image, so that picture is the first frame; the page counts the frames and says how many were left out.

Should a GIF Frame Become a JPG or a PNG?

A PNG keeps the frame exactly

Every pixel and every clear area, at a larger size than the JPG. That suits a logo, a diagram or anything you will edit again, where a speck on a sharp edge would show.

A JPG makes it smaller and opaque

Detail goes and the background fills in, in return for a file that nearly every photo program and printing service accepts. That suits a frame from a clip that looks like a photograph.

What the GIF brings to either

Its palette. Any banding or grain in the GIF is already part of its pixels, and neither format removes it. Choose between them on what happens next to the picture, not on which one looks sharper at first.

Common Mistakes

  • Expecting every frame. The JPG holds the first frame of an animated GIF, and the page says how many it left out.
  • Leaving the background to the browser. Its default fills clear pixels with black; this page starts at #FFFFFF and prints the colour it used.
  • Picking JPG for a sharp-edged graphic. Flat colour and crisp lines are what JPEG compression handles worst.

Frequently Asked Questions

What happens to an animated GIF when it becomes a JPG?

You get the first frame as one JPG. Some converters split every frame into its own file; this page takes the frame the browser hands over, counts the others and tells you how many were left out.

Does converting a GIF to JPG lose quality?

Yes, some. JPEG compression discards detail to save space, and more of it at a lower quality setting. Along the sharp edges a GIF usually has, that loss shows first.

What happens to a transparent GIF when it becomes a JPG?

Its clear pixels are filled with the background colour you choose, #FFFFFF unless you change it, because JPEG has no alpha channel. The JPG keeps no record of which pixels were clear.

You can, but the round trip is not the file you started from: the JPG to GIF direction.

The rest of the family sits on the image converter hub.