CONVERT TO SVG ·

How PNG to SVG Conversion Actually Works

What really happens when a converter turns pixels into paths – color quantization, edge detection, and Bézier fitting, explained without the math degree.

Drop a PNG into a converter, get an SVG back – it feels like a file-format change, but something much more interesting happened. The converter didn’t translate your image; it re-drew it. Understanding how explains every quirk of vectorization: why logos convert perfectly, why photos come out looking like posters, and which settings to reach for when the result isn’t right.

Pixels and paths speak different languages

A PNG stores a grid of colored squares – say, a million of them for a 1000×1000 logo. Nowhere in that file does it say “blue circle.” The circle is something you perceive; the file only knows pixels.

An SVG stores instructions: “draw a circle at these coordinates with this radius, fill it blue.” There is no resolution, because instructions can be followed at any scale.

Conversion, then, is an act of inference: the software must look at a million pixels and figure out the shapes a designer would have drawn. That process is called tracing, and it happens in three stages.

Stage 1: Color quantization

Real images contain thousands of subtly different colors – anti-aliasing alone smears every edge into gradients. The tracer first simplifies the palette down to a manageable number (our PNG to SVG converter uses 2 for B&W mode, around 8 for grayscale, and 16–32 for color, depending on the detail setting).

Every pixel is assigned to its closest palette color, which slices the image into distinct regions of flat color. This is why gradients “posterize” into bands – a smooth blue-to-purple fade has to be divided into discrete steps because vector shapes have single fills.

Stage 2: Edge detection

With colors flattened, the tracer walks the boundaries between regions, recording the exact pixel-by-pixel outline of every colored area. At this stage, the outlines are jagged – they follow the pixel grid in tiny right-angle steps, like a staircase.

If a converter stopped here, you’d get an SVG that technically scales but looks like it was built in Minecraft. Cheap converters more or less do stop here, which is one source of disappointing results.

Stage 3: Curve fitting

The crucial step: the tracer replaces those staircase outlines with smooth Bézier curves – the same mathematical curves designers draw with the pen tool. The algorithm finds the simplest set of curves that stays within a tolerance of the pixel boundary.

That tolerance is what “detail” settings control:

SettingToleranceResult
Low detailLooseSmooth, simplified shapes, small files
BalancedModerateFaithful edges, reasonable size
High detailTightCaptures every wobble, larger files

Loose tolerance smooths away both pixel jaggies and genuine detail; tight tolerance preserves detail but also faithfully reproduces noise. That’s the entire art of tracing settings: matching tolerance to how clean your source is.

Why logos convert perfectly and photos don’t

Now the behavior of every converter makes sense:

  • A flat-color logo quantizes losslessly (it already had few colors), produces clean region boundaries, and curve-fits beautifully. The output is essentially the original vector design, recovered.
  • A photograph has no flat regions at all. Quantization carves it into arbitrary bands, and the result is a stylized poster – sometimes striking, never photorealistic. That’s not a tool limitation; it’s the nature of representing continuous light with discrete shapes.
  • A JPG of a logo sits in between: the design wants to convert cleanly, but JPG compression added noise around every edge, which the tracer can mistake for detail. (Thresholding modes exist exactly for this – see JPG to SVG.)

What this means for your conversions

A few practical rules fall straight out of the mechanics:

  1. Feed the tracer flat colors and sharp edges when you can – PNG sources beat JPG, bigger beats smaller, original exports beat screenshots.
  2. Match the mode to the content: B&W for silhouettes and scans (quantization to 2 colors kills noise dead), color for multi-color art.
  3. Tune detail against the preview: speckles mean too much detail for your source quality; merged shapes mean too little.
  4. Expect interpretation, not photocopying, on anything with gradients or photographic texture.

Try it with the mechanics in mind – convert a PNG and watch what quantization and curve-fitting do to your particular image. Once you can read the output in terms of these three stages, getting a clean result stops being trial and error.

Design, convert, and ship SVGs in one place.

The full Free SVG Online studio – catalog, visual editor, and code inspector. No account, no limits, free forever.