How to Convert PNG to SVG

PNG to SVG isn't a normal conversion — it's tracing, and it only works on some images. Here's how to do it and what actually comes out.

Flat vector illustration in cobalt blue of a designer's night desk: hands on a drawing tablet, a warm gold desk lamp, and a monitor showing a blocky pixel star logo beside the same star redrawn as smooth curves

To convert a PNG to SVG you trace it: an auto-tracing tool detects the edges of flat colour areas in the pixels and redraws them as vector paths. This is not the same kind of job as swapping JPG for PNG. It works well for simple flat graphics — logos, icons, line art, silhouettes — and badly for photographs, which have no clean edges to follow. There is no button that turns a photo into a true vector, and any tool promising one is guessing.

babapic doesn't offer a PNG-to-SVG tool for that reason: tracing needs a vector editor and a set of decisions no automatic converter can make well for every image. What the site does handle is the reverse — SVG to PNG and SVG to JPG — which is a clean, exact operation. Understanding why the two directions aren't symmetric is most of what you need to know before you start.

Why PNG to SVG isn't a normal conversion

A PNG is raster: a fixed grid of coloured pixels. An SVG is vector: a set of mathematical shapes — this line, that curve, this fill. Going from vector to raster is simple, because you just render the maths onto a pixel grid at whatever size you ask for. Going the other way means looking at a grid of pixels and inventing the shapes that might have produced it. That's interpretation, not conversion.

For a two-colour logo, the interpretation is easy and the result is often excellent — sometimes indistinguishable from the vector original. For a photograph of a face or a landscape, there are no discrete shapes to find, so a tracer either produces a flat, posterised cartoon or a bloated file with thousands of tiny paths that is larger than the PNG and looks worse. The image decides whether tracing is worth doing, not the tool.

When tracing actually works

Ask one question about your PNG before you trace it: is it a flat graphic or a photo?

  • Good candidates: logos, app icons, monochrome symbols, simple line drawings, high-contrast silhouettes — anything built from a few solid colours with hard edges.
  • Poor candidates: photographs, screenshots with gradients, anything soft, textured, or heavily anti-aliased. These have no clean boundaries, so the trace guesses at every pixel.

If your PNG is a photo and you only need it smaller or in a friendlier format, tracing is the wrong move entirely — compress the PNG or convert it to JPG or WebP instead. SVG buys you nothing for a photo.

How to trace a PNG into an SVG

The job needs a vector editor with an auto-trace feature. Two do it well:

  1. Inkscape (free, open-source, desktop). Open the PNG, then use Path > Trace Bitmap. A single-scan trace produces a one-colour path; the multiple-scans mode approximates several colours. It's powered by potrace, and the preview lets you tune the threshold before you commit.
  2. Adobe Illustrator (paid). Place the PNG and use Image Trace, which ships with presets for black-and-white logos, line art, and limited-colour artwork. Expand the result to get editable paths.

Browser-based auto-tracers exist too, but check where your file goes before you upload artwork you don't own the rights to distribute — many process on a server. Whichever you use, the workflow is the same: trace, review the paths at high zoom, delete stray specks, and simplify until the shape count is as low as it can be while still looking right. A clean logo trace should be a handful of paths, not hundreds.

After you have the SVG

Once you've traced and cleaned it, the SVG is your master file — it scales to any size, from favicon to billboard, from one small file. Keep it. When a platform won't accept a vector (many social networks and older content systems reject SVG), export a raster copy with SVG to PNG at whatever pixel width that destination needs, transparency intact. Our guide on converting SVG to PNG covers picking that export size, and image formats explained lays out where raster and vector each belong.

FAQ

Can I convert a photo from PNG to SVG?
Not usefully. A photo has no discrete shapes to trace, so the result is either a posterised cartoon or a huge file of tiny paths that looks worse than the original. Tracing is for flat graphics — logos, icons, line art — not photographs.

Does babapic convert PNG to SVG?
No. Tracing raster to vector needs a vector editor and manual review, so it isn't a one-click browser job. babapic handles the reverse cleanly with SVG to PNG and SVG to JPG, and offers PNG conversion and compression for when you don't actually need a vector.

Will the SVG be smaller than the PNG?
For a simple logo, usually much smaller — a few vector paths weigh far less than a pixel grid. For anything detailed, the SVG can end up larger than the PNG, because every colour transition becomes another path. Fewer colours means a smaller, cleaner file.

Is there a lossless PNG-to-SVG conversion?
No. Tracing approximates the pixels rather than recovering the original shapes, so it's never an exact copy. If a true vector exists somewhere — the designer's original file — get that instead of tracing a PNG export of it.

← Back to all guides