SVG to GIF converter
Choose an SVG, set the size in pixels, and download a GIF: one still picture in up to 256 colours, with a see-through background if you want one.
Free, no account. The file is read by code running in your browser. It is not uploaded, and nothing about it is stored.
How to convert an SVG to GIF
- Pick the SVG you want as a GIF, drop it on the box, or paste its code.
- Set the width or height in pixels. The other follows unless you untick “Keep proportions”.
- Keep the see-through background, or untick it and choose a colour to fill it.
- Check the preview, which is the finished GIF itself, and download it.
What GIF can and cannot hold
GIF is a format from 1987 with two hard limits, and it is as well to know them before you choose it.
The first is colour. A GIF picture has a palette of at most 256 colours and every pixel must be one of them. A flat logo in five colours has room to spare, even counting the in-between shades along its smoothed edges. A drawing with gradients or soft shadows has thousands of colours, and they must be cut down to 256. This page tells you which case you are in: it says either that every colour of the drawing was kept, or how many there were to choose from.
The second is transparency. A GIF pixel is fully solid or fully see-through; there is nothing in between. An SVG’s edges are smoothed with partly see-through pixels, so each of those has to go one way or the other. Here a pixel less than half opaque becomes see-through, and the rest become solid, blended with the edge colour you pick. Choose the colour of the page the GIF will sit on and the edge disappears into it; choose wrongly and you get the pale fringe that old web graphics are known for.
If neither limit suits the picture, and nothing forces you to use GIF, convert the SVG to PNG instead. PNG has full colour and soft transparency, and for a still picture it is usually the smaller file as well.
Choosing the colours
When the drawing, at the size you set, has no more colours than the limit, the palette is simply those colours and the GIF is an exact copy of what your browser drew. When it has more, the palette is chosen by median cut: the drawing’s colours are sorted into as many groups as there are palette entries, splitting wherever the most pixels differ the most, and each group gets its average colour.
With “Dither” off, every pixel takes the nearest palette colour, and a gradient shows as bands. With it on, the rounding error of each pixel is passed to its neighbours (Floyd-Steinberg dithering), so the bands break up into a fine grain that reads as smooth from a little distance. Dithering makes the file larger, often several times, because the grain is harder to compress. For flat artwork leave it off.
You can also lower the number of colours. Fewer colours make a smaller file, and 16 or 32 are often enough for a logo. When part of the picture is see-through, one palette entry is spent on that, leaving 255 for colours.
Size, animation and what the file is
- Size: the SVG is drawn fresh at the pixel size you ask for, up to 4,096 pixels on a side, so a large GIF is as sharp as a small one. It starts at the SVG’s own size, or 512 pixels on the longer side if that is larger.
- Animation: the GIF is one still frame. An animated SVG gives a picture of its first moment, and the page tells you when your SVG is animated. This tool does not make animated GIFs.
- The file: GIF89a with one frame and one palette. The pixels are packed with LZW compression, which loses nothing, so the only changes to the picture are the two described above.
- Text and linked pictures: the SVG is drawn by your browser as a picture, which means fonts that are not on your device are replaced and pictures the SVG links to are not fetched. Convert text to paths first if the lettering matters.
Questions
Can I convert an animated SVG to an animated GIF?
Not here. This page saves one still frame. Recording an animation means drawing it many times a second and storing every frame, and at GIF’s 256 colours the result is usually large and rough; a short video file does that job better.
Why does my GIF have a pale outline?
The smoothed pixels along each edge were blended with the edge colour, which starts as white. Set the edge colour to the colour of the background the GIF will be shown on, or untick the transparent background and use that colour for the whole background.
Why does the gradient in my GIF show stripes?
There are more shades in the gradient than the 256 a GIF can hold, so neighbouring shades were merged. Tick “Dither” to break the stripes into grain, or use PNG, which keeps them all.
When is GIF the right choice for a still picture?
When the place it is going asks for GIF by name: some email signature tools, older forum and intranet software, and devices with simple displays. Anywhere that takes PNG, PNG is better.