JPG to GIF converter
Convert JPG images to GIF format
Photographs and GIF have never got along, and this page will not pretend otherwise. A JPEG can describe millions of shades; the GIF written here picks from a fixed grid of 216, chosen at even steps of 51 in each channel, and assigns every pixel to the closest one without dithering. Skies, skin and shadows therefore arrive as visible steps rather than smooth gradients. The output is a single still frame, so this is not the tool for making an animation. When a system insists on .gif, though, it does the job in one pass in your browser.
Key facts about JPG to GIF converter
| Colour reduction | Millions of JPEG colours are mapped onto 216 fixed values - each channel snapped to 0, 51, 102, 153, 204 or 255. |
|---|---|
| Matching method | Nearest neighbour by squared distance in RGB, pixel by pixel, with no error diffusion to disguise the jump. |
| Visible result | Banding in gradients and posterised skin tones, most obvious in skies, out-of-focus backgrounds and soft shadows. |
| Frames | One. There is no delay, no loop extension and no frame list, so the file is a still picture in GIF89a form. |
| Size behaviour | A photographic GIF is usually larger than the JPEG it came from, because LZW struggles with the noisy index runs that banding creates. |
| Transparency | None is written, and none is needed - a JPEG source is opaque everywhere to begin with. |
| Compression | LZW over palette indices, encoded in the page, with the dictionary reset at 4096 entries as the format requires. |
| Metadata | EXIF, GPS and the colour profile are gone; a GIF has no equivalent field, and nothing beyond pixels reaches the encoder. |
| Opens natively in | Every browser, chat client, email program and image viewer ever written - universal support is the format's remaining advantage. |
What happens to your file
Everything runs on the page: the browser decodes the JPEG, a canvas gives up its pixel array, JavaScript matches each pixel against the 216-entry palette, and a second pass performs the LZW compression and writes the GIF header, the global colour table and the image blocks into a Blob. There is no palette service, no WebAssembly module and no upload, so a photo that still has your location in its original file never travels anywhere - and the GIF copy carries no metadata at all.
About this tool
- 1
Add the JPG
Any .jpg or .jpeg file, or an iPhone .heic that the page decodes to JPEG data first.
- 2
Read the amber warning
The notice above the drop zone flags the 256-colour ceiling before you convert; for photos it is the whole story.
- 3
Reduce the size
Smaller images hide banding better and compress far more efficiently, so the 800 px and 480 px presets are worth using here.
- 4
Convert and judge the gradients
Check the sky or any large soft area in the result. If the stepping is unacceptable, PNG or WebP is the better target.
| Input and output | Takes .jpg and .jpeg only (image/jpeg) and returns .gif with the image/gif type; any other extension is refused before decoding. |
|---|---|
| Conversion path | JPG to GIF runs in three steps: an <img> element decodes the JPEG, baseline or progressive, in the browser; the pixels land on a 2D canvas in this tab; then getImageData feeds a palette mapper and an LZW encoder that live in the page. |
| Browser support | The JPEG side decodes in every browser ever shipped, while writing the GIF needs nothing from the browser, the encoder shipping inside the page. |
| Controls for this pair | No quality slider, GIF not being a lossy target here, so the max-dimension presets from 3840 down to 200 px are the only way to hold the GIF down in size against the JPG. |
| Batch, caps and naming | Twenty JPG files per run at 500 MB each; one result downloads as a single GIF, several as converted-gif-files.zip, zipped by JSZip 3.10 in page memory. |
| Device ceiling | The canvas caps it: past roughly 16,384 px a side Chromium refuses the bitmap and iPhone Safari gives up sooner, so an oversized JPG fails before any GIF bytes exist. |
- High-contrast subjects with few flat regions - architecture, text on signage, graphic close-ups - survive the palette much better than portraits do.
- If you only need a widely supported image rather than the GIF format specifically, PNG is equally universal and keeps every colour.
- Cropping to the part you actually need before converting removes exactly the large soft backgrounds that band worst.
- A GIF larger than its JPEG source is normal here and not a sign of failure - the format is simply the wrong fit for photographs.
- Uploading to an old forum, wiki or intranet system whose image field accepts only .gif.
- Producing a deliberately posterised, retro-looking version of a photo for a graphic project.
- Feeding a legacy document or presentation template that was built around GIF assets.
Related tools
View allNeed the opposite? Try GIF to JPG
Other GIF tools12
Updated