Convert GIF to SVG

Converting GIF to SVG traces the picture into vector paths, which is what lets an old logo be scaled to any size without going soft. It works well on the flat artwork most GIFs contain and badly on photographs, and the tracing runs in your browser.

  • Where it runs In your browser. The file is never uploaded.
  • Rebuilt SVG works differently from a GIF, so this is not the gradual degradation a lossy codec applies. What SVG can express is reproduced faithfully; what it has no equivalent for does not survive at all.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing Tracing redraws the picture as flat shapes, which is what lets the result be scaled to any size without going soft. It works by finding the edges between areas of similar colour and drawing an outline around each one, so it is at its best where those areas genuinely exist: a logo, an icon, a flat illustration, a scanned line drawing. A photograph has no flat areas, so tracing invents them — the result is posterised and larger than what you started with. The traced file is measured against yours, and the page tells you which of the two happened before you download it.

Up to 100 files at once. Mixed formats are fine.

A GIF is the easiest thing a tracer can be handed

Tracing works by finding the boundaries between areas of similar colour and drawing an outline around each area. That means it is at its best when those areas genuinely exist, with hard edges and no subtle variation across them.

An indexed image is exactly that by construction. A GIF frame is drawn from a palette of at most 256 entries, so every pixel is one of a small set of exact values and the regions are already flat before the tracer looks at them. The limitation that makes GIF a bad photographic format is, for this one conversion, the thing that makes it a good source.

The tracer redraws the picture and does not recover it

It is worth being precise about what comes out. The SVG is not the drawing somebody made in 1998 and exported as a GIF; it is a new set of paths fitted to the pixels of that export. Where the original had a perfect circle, the trace has a closed curve that follows a circle made of pixels.

At the sizes people actually use these files that difference does not show. What does show is anywhere the original had something a path cannot represent — a gradient becomes a set of stepped bands, a drop shadow becomes several concentric shapes, and antialiasing along a curve becomes a thin extra outline in an intermediate colour.

Setting the colour count against the palette you have

The colours option reduces the picture to that many flat fills before any outlines are drawn, and it is the setting with the largest effect on both the look and the size of the result. Four gives the cleanest possible shapes and is right for a single-colour mark. Eight is the default and covers most logos. Sixteen and thirty-two follow the source more closely and multiply the number of paths.

The instinct to pick the highest number is usually wrong. More colours means the antialiased fringe around every edge gets its own shapes rather than being absorbed into the fill on either side, and those shapes are both the bulk of the file and the first thing you would delete by hand. Starting low and going up only if something important disappeared is the faster route.

What smooth, balanced and sharp actually change

The detail setting controls two error thresholds and a minimum shape size. Smooth accepts a looser fit to the pixel edges and discards any shape smaller than sixteen pixels; balanced halves those tolerances and drops shapes under eight; sharp follows the pixels closely and keeps anything above two.

The practical effect is on speckle. Antialiasing leaves a scatter of one-pixel and two-pixel fragments along every edge, and on sharp they all become paths — hundreds of them, invisible individually and responsible for most of the file size. Smooth removes them and rounds the corners slightly in the process. For a logo that will be scaled up, smooth is almost always the better answer; for pixel art you actually want to preserve, sharp is the only one that keeps it.

Dithering is what ruins a trace of a GIF

If the GIF was made from a photograph or a gradient, the encoder almost certainly dithered it — scattering pixels of two palette colours in a checkerboard so the eye averages them. That looks like a smooth transition and it is not one.

To a tracer it is thousands of tiny alternating regions, each of which becomes a path. The output is enormous, the file takes a long time to draw, and the visual result is a posterised mess rather than the gradient it was imitating. This is the single reliable indicator of whether this conversion will work: zoom into the GIF, and if the flat areas turn out to be checkerboards, stop here.

Large GIFs are scaled to 1600 pixels before tracing

Anything with a longest edge above 1600 pixels is scaled down to that before the outlines are found. Tracing cost grows with the number of edges rather than with the file size, and a large image has an edge almost everywhere, so without a ceiling a big source produces a multi-megabyte SVG over tens of seconds.

For this conversion the ceiling costs nothing, and that is not a hedge. The output is resolution-independent: a mark traced from a 1600-pixel image and the same mark traced from a 4000-pixel image render identically at any size on screen or in print. All that changes is how tightly the paths hug the original pixel grid, which is a difference you would need to zoom in on the source to see.

Text in the GIF is the case that goes worst, measured

A screenshot containing text was measured at forty times the size of the source image when traced. Every antialiased letter becomes its own collection of shapes, the counters inside letters become separate paths, and the result is both huge and slightly wrong at every stroke.

The right move when the graphic contains words is to trace only the symbol and set the words as real text in the SVG afterwards, in the actual typeface. That produces a smaller file, sharper output at every size, and something that can be edited or translated later. Tracing the text is only reasonable when the lettering is genuinely custom artwork rather than a font.

Compare the two byte counts before you keep the result

Nothing here tries to predict whether your particular GIF will trace well. A colour-count heuristic would be a guess, and the real answer is available a moment later for free: trace the file, then look at what came out against what went in.

The page shows both sizes, so a result that is forty times larger announces itself immediately. Treat that as the signal rather than as a curiosity — an SVG bigger than its source is telling you the picture had no flat regions to find, and no combination of settings will change that fact about the image.

The tracing runs in the page, not on a server

The tracer is a small JavaScript library — 46 KB, chosen partly because the better alternatives are licensed in ways a static site cannot honour — and it runs in the tab. The GIF is decoded, reduced, traced and written out as SVG without a request leaving your browser.

The practical benefit beyond privacy is speed on small files. There is no upload, no queue and no download of the result from somewhere else, so a logo traces in well under a second and trying three different colour counts costs nothing but the clicks.

How to trace a GIF into an SVG

  1. Drop the GIF onto this page, or click to choose it.
  2. Start with eight colours and the smooth setting, then convert.
  3. Compare the SVG against the GIF, and try four colours if it came out larger.

GIF and SVG: a pixel grid becoming a set of outlines

GIF compared with SVG
GIFSVG
Full nameGraphics Interchange FormatScalable Vector Graphics
File extension.gif.svg
Media typeimage/gifimage/svg+xml
CompressionLossless — nothing is discardedUncompressed
First published19872001
Published byCompuServeW3C
SpecificationGIF89aSVG 1.1
LicensingOpen standardOpen standard
Standing todayLegacy, still read everywhereCurrent
Bit depth8
Colour it can describeindexed paletteRGB
Largest image65,535 px per side
Opens in a browserEvery browserEvery browser
Considered insteadWebP, MP4PNG, PDF

What survives

Transparency survives. Both GIF and SVG store an alpha channel, so a cut-out stays cut out and nothing is filled in behind it.

Animation survives. GIF and SVG both hold multiple frames, so the result moves rather than freezing on the first one.

What the target format adds

SVG is a working format and GIF is a finished one. What comes back is editable text and objects rather than a picture of a page, which is usually the reason for the conversion and also where its limits are.

Opening the result

GIF dates from 1987 and is largely superseded. SVG is what current software writes, so the conversion is as much about staying readable as about the file itself.

The usual programs do not overlap: GIF opens in GIMP, Adobe Photoshop and ImageMagick, SVG in Inkscape, Adobe Illustrator and Figma — so whoever receives the result needs something from the second list.

File size and quality

SVG stores the samples raw, so the file grows substantially without gaining anything. It is the right direction only when a program on the far side refuses GIF, which is the usual reason for doing it.

What each format is for

GIF is CompuServe's format, published in 1987. It records 8 bits per channel.

SVG comes from W3C and dates from 2001, specified as SVG 1.1. Inkscape, Adobe Illustrator and Figma all read it.

GIF to SVG: tracing quality, colours and editing

Will tracing recover the original logo?

No. Tracing looks at the pixels and draws outlines around regions of similar colour; it has no knowledge of the shapes the designer drew. On a clean flat mark the result is close enough to be indistinguishable at normal sizes. On anything with a gradient, a soft shadow or antialiased text it is an approximation, and a close look at the paths shows it.

How many colours should I choose?

Eight is the default and suits most logos. Four is right for a single-colour mark or a two-tone symbol and produces the cleanest paths. Sixteen or thirty-two follow the original more closely and produce a much larger file with many more shapes, which is usually the wrong trade for artwork you intend to edit afterwards.

Why is my SVG bigger than the GIF?

Because every distinct region of colour becomes a path, and some images have thousands of them. A screenshot containing text was measured at forty times the size of the source, since every antialiased letter turns into its own pile of shapes. The page compares the two byte counts for you before you download, so you find out immediately rather than later.

Can I edit the result in Illustrator or Inkscape?

Yes. The output is ordinary SVG paths with flat fills, which both applications open and edit directly. It will not have layers, groups or named objects, because none of that information exists in a GIF — what you get is a flat pile of shapes to tidy up.

What happens to an animated GIF?

Only the first frame is traced. SVG does support animation, but this conversion produces a static drawing from a single decoded picture, so a moving GIF becomes the moment it opens on.

Is the image uploaded to trace it?

No. The tracer is a small JavaScript library that runs in the page, so the GIF never leaves the browser. There is no account and no queue, and the whole thing happens in the time it takes to read this sentence for a small graphic.

More about these formats

Where these figures come from

The claims this page makes about GIF and SVG are checkable, and these are the documents that settle them.