Image tools

How to Convert a PNG or JPG to SVG (a Real Vector, Not a Wrapper)

How image tracing turns a PNG or JPG logo into true SVG paths, which images convert well, and the colour, detail and background settings that give a clean, small file.

6 min readUpdated

A PNG is a grid of coloured pixels. An SVG is a list of shapes - fill this outline with navy, that circle with orange. Converting one to the other is not a change of file format like PNG to JPG; something has to look at the pixels and work out what shapes they show. That process is called tracing, and how well it goes depends far more on the picture you start with and three or four settings than on the converter.

Two very different things called "PNG to SVG"

Many converters take the easy route: they put your PNG inside an SVG file as an embedded image. Open the result in a text editor and you will find one <image> tag carrying a long base64 string - your original pixels, unchanged. It has the .svg extension, but it is still a bitmap. It goes blurry when enlarged, it cannot be recoloured, and a cutting machine or laser engraver has no outlines to follow.

A traced SVG contains only <path> elements. Each one is an outline made of straight lines and curves, filled with a single colour. It stays sharp at any size, and every shape can be selected, recoloured or deleted in Illustrator, Inkscape or Figma. The Image to SVG converter produces this kind, and you can check any SVG yourself: search the file for <image. If it is there, nothing was traced.

How tracing works

  1. Reduce the colours. A logo saved as PNG holds thousands of distinct colours, mostly the blended shades along anti-aliased edges. The tracer groups them into a small palette - say white, navy and orange - and snaps every pixel to its nearest palette colour.
  2. Clean up specks. The blended edge pixels between two colours sometimes land nearest a third one, leaving a trail of one- or two-pixel fragments along every edge. Small regions are merged into whatever surrounds them.
  3. Find the outlines. For each colour, the boundary of every connected area is followed pixel by pixel, including holes such as the inside of an O.
  4. Fit lines and curves. The staircase outline is replaced by the fewest straight segments and smooth curves that stay within a set distance of it. That tolerance is the difference between a faceted shape and a clean one.

In the Zenoply tool all four steps run in your browser, in a background worker, so the picture is never uploaded.

What converts well, and what does not

Tracing rewards images that were flat colour to begin with: logos, icons, badges, stickers, clip art, cartoons, signatures, stamps and line drawings. A handful of shapes describes them exactly, and the SVG usually comes out smaller than the PNG.

Photographs are the opposite case. Every patch of shading becomes its own shape, so the result looks posterised and can be larger than the JPG it came from. That is useful if a poster-art effect is what you want; for keeping a photo, stay with JPG or WebP. Screenshots of text trace legibly but not perfectly - small letters lose their crispness, and for a document you would want OCR instead.

Step by step

  1. Open the Image to SVG converter and drop in a PNG, JPG or WebP. Use the largest copy you have: a 1000-pixel logo traces far better than a 100-pixel favicon.
  2. Choose Colour for logos and illustrations, or Black & white for signatures, line art and stamps. Black & white turns every pixel black or white first, with the threshold picked automatically, then traces only the black.
  3. In Colour mode, set Colours to the number of colours the artwork really has, counting the background. A two-colour logo on white is 3.
  4. Pick a Detail level. Low traces at up to 500 pixels and makes the smallest file; Medium (up to 1000) suits most logos; High (up to 1600) keeps fine detail at the cost of size.
  5. Tick Transparent background to leave out the colour around the edges, so the logo sits on any page colour.
  6. Compare with the Original toggle, then Download SVG, or use Copy SVG code to paste it straight into HTML.

A worked example: one logo, three settings

The test file is an 800x800 PNG of 39.8 KB: a navy ring around an orange disc with a navy letter Z, on white. These are the results from the tool:

  • Default 8 colours, Medium detail: 5 colours, 17 shapes, 5.4 KB. Three real colours, plus two in-between shades of navy and white that the anti-aliased letter edges were long enough to keep.
  • Colours set to 3: 3 colours, 4 shapes, 4.1 KB - the background, the ring, the letter, and the disc with a letter-shaped hole cut in it. Under 1% of pixels differ noticeably from the original when the SVG is drawn back at 800 pixels, all of them on edges.
  • Black & white with a transparent background: 1 colour, 2 shapes, 2.0 KB. The orange disc fell on the dark side of the automatic threshold and merged with the letter into a solid black circle.

Two lessons from that. More colours than the artwork has does not add quality; it adds halo shapes along the edges. And Black & white is for artwork that really is one colour - on a multi-colour logo it decides which colours count as ink, and you may not like its choice.

Getting a clean result from a poor source

  • Blurry or small logo: lower Colours first. Blur creates a band of in-between shades along every edge, and each spare palette slot gets spent on one.
  • Blocky JPG: tick Smooth out noise first. It blurs within flat areas but leaves strong edges alone; on a grainy test photo it cut the shape count from 263 to 54.
  • Specks and dust on a scanned signature: Black & white mode, then drag the threshold up or down. Low detail also merges anything under 24 pixels.
  • Rounded corners coming out chunky: use High detail, which follows edges more closely and fits curves more tightly.

If the result is still over a megabyte, the tool says so. That almost always means a photo or a heavily textured picture, and the honest answer is that it is not a good tracing subject.

Tracing does not recover the original

A traced SVG is a new drawing made from the pixels, not the designer's file. Curves will have more nodes than a hand-drawn version, and type is outlines, not editable text. For a logo you own, it is always worth asking for the original vector first. When there is none - an old business card scan, a logo from a defunct agency - tracing is how you get a usable vector back. Going the other way, from SVG to pixels, is covered in How to Convert SVG to PNG.

Frequently asked questions

Is converting PNG to SVG lossless?
No. Tracing reduces the picture to a fixed set of colours and smooth outlines, so gradients, texture and soft shadows are simplified or lost. For flat artwork the difference is usually invisible - on the test logo in this guide, under 1% of pixels changed noticeably, all on anti-aliased edges. For photos the loss is obvious, which is why they are better kept as JPG or WebP.
How many colours should I use when tracing a logo?
The number the logo really has, counting the background. A navy and orange logo on white is 3. Extra colours do not add accuracy; they get spent on the blended shades along edges, which adds thin halo shapes and bloats the file. Raise the count only if a real colour in the artwork has been merged into its neighbour.
Can I use the traced SVG with a Cricut or laser cutter?
Yes - the output is pure path shapes, which is what cutting and engraving software needs. For a single-colour cut, use Black & white mode with a transparent background so only the ink is left as shapes. Check the result at full size first, since tiny islands and thin strokes may be too fine for the blade or beam to cut cleanly.