UltKit

How to Convert PNG to SVG: Tracing Logos, Icons and Line Art

To convert a PNG to SVG you trace it: software groups the pixels into flat color areas and redraws their edges as curves. That works very well for logos, icons, signatures and line art, and poorly for photos, gradients and tiny text.

Jonas WeberJonas WeberWeb performance editor
Updated 12 min read
A hand holding a stylus over a tablet that rests on an open magazine page printed with a grid of small white icons on black
Answer

Can a PNG be turned into a real, scalable SVG?

Yes, by tracing it into vector paths, not by wrapping it. Use a PNG at least 1000 px wide, set the color count to the number of flat colors in the design (often 2–8), or switch to black and white for line art, then zoom in on the SVG to check the curves before you use it.

Pixels versus paths: what a PNG to SVG conversion really changes

A PNG is a raster image: a fixed grid of pixels, each with a color and, optionally, an opacity value. A 500 × 500 px logo holds exactly 250,000 of those squares and nothing else, so enlarging it to poster size can only make each square bigger or blur the gaps between them. An SVG is a vector image, a text file that lists shapes such as <path>, <circle> and <rect> with coordinates and fill colors. A browser or a cutting machine redraws those shapes at whatever size it needs, which is why a vector logo stays crisp on a phone screen and on a trade-show banner.

Going from vector to raster is easy because the renderer simply paints the shapes into pixels; SVG to PNG does exactly that in a second. Going the other way has no lossless shortcut, because the pixel grid holds no record of the shapes that produced it. Something has to look at the pixels and guess where each shape begins and ends. That guessing step is called tracing or vectorizing, and every honest PNG to SVG converter, from Illustrator to a command-line program, is a tracer underneath.

Some converters skip the hard part. They write a valid SVG file that contains one <image> element with the original PNG embedded as base64 text, which also makes the file about a third larger than the PNG. The result opens as an SVG and passes a file-type check, but it is still a pixel image in a vector wrapper: zoom in and you see the same jagged edges, and a cutting machine finds no paths to follow. Open any SVG in a text editor and search for data:image/png; if that string is there, nothing was vectorized.

MythSaving or renaming a PNG as .svg makes it a vector.

FactRenaming changes the extension only. The pixels stay pixels, and most apps refuse to open the file.

MythAn SVG that embeds the PNG is a real vector file.

FactIt is a raster image inside an SVG container. Only traced <path> elements scale without pixelation.

MythTracing restores detail a small PNG never had.

FactThe tracer follows the pixels it is given. A blurry 64 px icon traces into blobby shapes that stay blobby at any size.

Artwork that traces cleanly, and artwork that never will

Tracing rewards images that were drawn as shapes in the first place. A logo exported from a design app, a flat icon, a cartoon with black outlines, a scanned signature or a stencil all consist of a handful of solid colors separated by clear edges. The tracer groups each color into regions, follows their borders and fits smooth curves along them, so the SVG ends up close to the shapes the designer originally drew. Bold lettering in a wordmark traces well too, because a large letter is just another filled shape, and each glyph becomes an outline you can recolor or resize but no longer retype.

Photographs are the opposite case. A portrait or a product shot has thousands of subtly different tones blending into each other, and a vector format has no efficient way to describe that. Ask a tracer for 16 colors and you get a posterized illustration with visible bands; ask for 64 and you get tens of thousands of tiny shapes in a file much bigger than the PNG, which still does not look like a photo. Soft gradients, drop shadows and glows turn into stacks of thin bands in the same way. Small text is a third trouble spot: at 10–12 px, anti-aliasing blends every letter into its background, and the tracer cannot tell an "e" from an "o".

Traces cleanly

  • Logos and wordmarks with flat colors
  • Icons, pictograms and clip art
  • Ink drawings, coloring pages and comics
  • Signatures and stamps scanned on white paper

Needs preparation

  • Logos with a soft drop shadow or glow
  • Pencil sketches with uneven gray strokes
  • Screenshots of a logo on a busy background
  • Pixel art, which needs pixel-edge curves

Will not look right

  • Photos of people, food or landscapes
  • Images built on smooth gradients
  • Text smaller than about 14 px
  • Heavily compressed or upscaled images

Give the tracer a better PNG to work from

Resolution matters more than any setting. The tracer fits each curve to the staircase of pixels along an edge, and the finer that staircase, the truer the curve. If you exported the PNG yourself from Figma, Canva, Photoshop or a slide deck, export it again at two or three times the display size; a logo that is 1500–2000 px wide gives a tracer plenty to work with. Do not upscale a small PNG with an AI enlarger first unless the result looks clean at 100 % zoom, because invented edge texture is traced just as faithfully as real edges.

Next, make the background simple. PNG supports full transparency, and a transparent background is the easiest case: every fully transparent pixel is treated as empty space, so the SVG has no white box behind the artwork. If the PNG has a solid backdrop, crop tightly around the artwork first; our guide on how to crop an image to a ratio covers exact framing. A busy background, such as a logo photographed on a T-shirt, should be removed or painted over with one flat color before tracing.

Finally, reduce the color count before the tracer does it for you. Hide shadows, glows and gradient overlays in the source file, and replace a gradient fill with its middle color if the vector version does not need it. Count the solid colors left, including the outline color, and write the number down; it is the most useful number you will enter in the next step. If you are choosing between a JPEG and a PNG of the same logo, take the PNG, since JPEG compression adds noise around every edge, as explained in JPG vs JPEG vs PNG.

  • The PNG is at least 1000 px wide, ideally 1500–2000 px for a detailed logo
  • The background is transparent or one flat color, cropped close to the artwork
  • Shadows, glows, textures and gradients are hidden or flattened
  • You know how many solid colors the design uses, including the outline

Choosing colors, smoothing and threshold for your artwork

Every tracer asks the same three questions, even when the labels differ. The first is how many colors to keep. In the PNG to SVG converter, Color mode chooses between Color, Grayscale and Black & white, and Number of colors sets how many clusters the pixels are sorted into, from 2 to 64. Match it to the count you wrote down. Setting it too high makes the tracer split anti-aliased edge pixels into their own thin colors, which shows up as a faint halo around every shape; setting it too low merges two brand colors into one.

The second question is how to treat edges. Smoothing rounds off the stair steps left by pixels, and Detail decides how small a speck may be and still become a shape. The PNG page starts at Detail 70 and Smoothing 40, which keeps small corners on a clean export. Lower Detail if dust and stray dots appear, raise Smoothing if curves look wobbly, and set Curves to Straight lines for geometric logos built from straight edges or to Pixel edges for pixel art you want to stay blocky.

The third question only applies to black and white tracing: where to draw the line between ink and paper. Threshold runs from 1 to 254 with 128 as the default. Pixels darker than the threshold become black, lighter ones become empty. For a signature written in thin blue ballpoint, raise it toward 160–180 so faint strokes survive; for a bold marker drawing on slightly gray paper, lower it toward 100 so the paper texture does not turn into specks. Change one setting at a time and compare, because the effects interact.

Starting points by type of artwork; adjust one value at a time
ArtworkColor modeColors / thresholdEdges
One-color logo or iconBlack & whiteThreshold 128Smooth curves
Flat logo with 3–5 colorsColorExact color countSmooth curves, Smoothing 40
Geometric logo, straight edgesColorExact color countStraight lines
Signature in thin ballpointBlack & whiteThreshold 160–180Smooth curves, more Smoothing
Pencil sketchGrayscale4–6 graysLower Detail to drop paper grain
Pixel art spriteColorExact palette sizePixel edges
Photo, for a poster effectColor8–16 colorsExpect a stylized result
A tablet on a wooden desk showing a capital letter A drawn in thin pen strokes, next to a stylus, headphones and an orange design book
Photo: Unsplash

How to judge the SVG you get back

Do not stop at the thumbnail. Open the SVG in a browser and zoom to 400–800 % on the tightest curve, a letter bowl or the tip of a point. A good trace shows smooth arcs and sharp corners where the design has corners; a weak one shows wobbles, dents and rounded tips. Then look at the file in a vector editor such as Inkscape, Illustrator or Figma and turn on outline or node view. A simple two-color logo typically needs a few hundred nodes; if yours shows several thousand, the tracer has been following noise and the paths will be painful to edit or cut.

File size is a quick sanity check. An optimized SVG of a flat logo is typically a few kilobytes to a few tens of kilobytes, often smaller than the PNG it came from. A traced file several times larger than the source PNG usually means too many colors, too much detail, or a photo that should not have been traced. Keep Optimise SVG switched on, since it rounds coordinates and merges paths without a visible change, and finally scale the artwork up to poster size and down to favicon size to confirm it reads well at both.

  • Thin halos or outlines around each shape

    Anti-aliased edge pixels became their own color. Lower Number of colors by one or two, or raise Smoothing.

  • Hundreds of tiny specks around the artwork

    Noise or paper grain was traced. Lower Detail, or clean the background of the PNG and trace again.

  • Fine lines broken into dashes in black and white mode

    The strokes are lighter than the cut-off. Raise Threshold in steps of 15–20 until they close.

  • Square corners came out rounded

    Smoothing is too high for this design. Lower it, or switch Curves to Straight lines for geometric shapes.

Inkscape, Illustrator, Potrace or the browser

The free desktop option is Inkscape. Import the PNG, select it and open Path > Trace Bitmap (Shift+Alt+B). Single-scan modes such as Brightness cutoff produce one black path, which suits line art; multiple-scan modes trace a set number of colors or grays as stacked layers. Inkscape's black and white tracing is built on Potrace, a tracing library Peter Selinger released in 2001. Potrace itself is a command-line program that reads PBM, PGM, PPM or BMP rather than PNG, handles two-tone images only, and writes SVG, PDF, EPS or DXF, which makes it a good choice for scripting large batches of scans.

In Adobe Illustrator, Image Trace replaced the older Live Trace in Illustrator CS6. Place the PNG, open Window > Image Trace and start from a preset such as Black and White Logo, 3 Colors or 16 Colors, then adjust Paths, Corners and Noise in the advanced section. The trace stays live until you click Expand, which turns it into ordinary editable paths. If you do not have either program installed, a browser converter runs the same reduce-colors, find-edges, fit-curves process; the image to SVG converter also accepts JPG, WebP and HEIC and can write EPS, PDF or DXF instead of SVG.

  • Inkscape Trace Bitmap

    Free for Windows, macOS and Linux. Single-scan and multi-color modes, live preview, full path editing afterwards.

  • Illustrator Image Trace

    Paid, part of Creative Cloud. Presets per artwork type, then Expand to edit paths alongside your other vector work.

  • Potrace

    Free, command line, two-tone input only. Best for scripted batches of signatures, stamps and scanned line drawings.

  • Browser converter

    Nothing to install, up to 20 files of up to 95 MB per batch, uploads deleted after 30 minutes.

Where the SVG goes next, and when to ask for the source file

On the web, SVG has been a W3C Recommendation since 2001 and every current browser renders it in an <img> tag, as a CSS background or inline in the HTML, where its colors can even change on hover. A traced logo usually replaces several PNG sizes for retina screens with one small file. For cutting machines, SVG is the format Cricut Design Space and Silhouette Studio expect: each traced shape becomes a cut path, and a multi-color trace arrives as separate layers you can cut from different vinyl colors. Laser cutters and CNC software usually prefer DXF, which PNG to DXF produces from the same tracing settings.

Print shops ask for vector artwork because a press, an embroidery digitizer or a sign cutter needs edges, not pixels, and a traced SVG often satisfies that for stickers, T-shirts or a banner. It is still an approximation: the curves are fitted guesses, the colors are averaged from pixels, and text is outlined. So before you trace a company logo, ask whoever made it. A designer or agency almost always has the original AI, EPS, PDF or SVG with exact curves, named colors and fonts, and sending it takes them a minute. Tracing is the right tool when that original is lost, when the logo only survives on a scanned letterhead, or when the artwork is your own drawing.

Tracing does not change who owns the artwork

Converting a logo, character or illustration to SVG creates a copy in another format, not a new design. Trace artwork you own, have permission to use, or have licensed, and check the license before cutting or printing someone else's work for sale.

Key takeaways

  • A PNG becomes a real SVG only through tracing; an SVG that embeds the PNG is still a pixel image.
  • Logos, icons, signatures and line art with few flat colors trace cleanly; photos, gradients and tiny text do not.
  • Start from a large, clean PNG with a transparent or flat background and know its exact color count.
  • Check the result at high zoom, in node view and against its file size before you use it.
  • If a designer made the logo, ask for the original vector file before tracing a copy.

Frequently asked questions

How can I tell whether an SVG file is a real vector or a wrapped image?

Open it in a text editor. If you see path elements with long lists of coordinates, it is a vector. If you see a single image element with data:image/png followed by a long block of text, it is a PNG inside an SVG wrapper.

Will converting the SVG back to PNG lose quality?

No, as long as you render it at the size you need. A vector can be turned into a PNG of any pixel size, so export a fresh PNG for each use instead of resizing an old one.

How many nodes should a traced logo have?

There is no fixed limit, but a simple flat logo typically needs a few hundred. Thousands of nodes usually mean the tracer followed noise, so lower the detail or color count and trace again.

Why do I see thin white lines between colored shapes in my SVG?

Shapes that meet edge to edge can show hairline gaps when a viewer anti-aliases each one separately. Tracers that stack shapes on top of each other avoid most of this.

Should I send a printer an SVG or a PDF?

Ask what they accept. Many print shops prefer PDF or EPS because their workflows are built around them, and both can hold the same vector paths as the SVG.

Can I edit the text in a traced logo?

Not as text. Tracing turns letters into outlined shapes, so to change a word you need to identify the font, retype it in a vector editor and place it where the traced letters were.

Keep reading