Skip to content

PNG to SVG converter

PNG → SVG traces pixel regions into filled vector paths, so a flat logo scales cleanly while a photograph turns into a patchwork of colour blobs.

  • Converted with Image engine · input deleted within 24 h
  • Free: 5 conversions a day · 5 MB each
  • Higher limits →

From real runs

What you get — and what changes

  • Flat colour regions Kept

    The mountains, the sun disc and the green foreground band of the 1200×800 sample came back as clean filled paths with matching hex colours.

  • Gradient sky Changed

    The sky ran from #2BC5DA at the top to #4DA5C9 in the middle; the trace collapsed it into one flat #4CA5C9 fill covering the whole canvas.

  • Caption text Changed

    The words in the caption became filled glyph-shaped paths that render slightly bolder than the source; nothing in the SVG is selectable or editable as text.

  • Transparency Lost

    The transparent corner of the PNG came out as an opaque black shape: the tracer sees alpha-zero pixels as black and gives them their own path.

  • Path count and size Changed

    20,828 bytes of PNG became 34,597 bytes of SVG holding 70 paths in 38 fill colours; binary mode drops that to 18 black-and-white paths.

  • Resolution Changed

    Images wider or taller than 1,600 pixels are downsampled before tracing (maxDimension), so fine detail in large scans is simplified.

  • Metadata Lost

    PNG text chunks, colour profiles and DPI are not carried into the SVG; the root element only records width and height in pixels.

Sample conversions

Flat illustration with a gradient sky

Input
sample.png, 1200×800 RGBA, 20,828 bytes: mountains, a sun, a green band and a one-line caption over a two-tone sky gradient.
Output
34,597-byte SVG with 70 paths and 38 fills in 190 ms. Shapes and caption outlines were faithful; the gradient became one flat blue and the transparent corner turned black.

Same file traced in binary mode

Input
The same PNG with options {"mode":"binary"}.
Output
20,349-byte SVG with 18 paths: a black silhouette of the mountains, band and caption on white, with the sun merged into the background.

A real PNG → SVG run

We converted our PNG sample (20 KB) with Image engine on 2026-09-11. It took 190 ms and produced a 34 KB SVG file, 1.7× larger than the input. The engine raised 1 warning, listed below.

Input · sample.png · 20 KB

1200 × 800 px, 8-bit, colour type 6

Width
1,200
Height
800
Encoding
8-bit, colour type 6

Output · sample.svg · 34 KB

SVG, 70 paths

Paths
70
  • Pixels traced to 70 vector paths; text in the image is not editable and photographs become flat colour regions.

First lines of the output

svg
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1200" height="800">
<path d="M0 0 C396 0 792 0 1200 0 C1200 264 1200 528 1200 800 C804 800 408 800 0 800 C0 536 0 272 0 0 Z " fill="#4CA5C9" transform="translate(0,0)"/>
<path d="M0 0 C2.744 1.551 5.265 3.314 7.786 5.203 C11.785 8.07 16.149 10.317 20.451 12.692 C22.42 13.815 24.389 14.939 26.357 16.063 C33.811 20.274 41.378 24.263 48.951 28.255 C59.113 33.613 69.181 39.089 79.15 44.802 C87.326 49.461 95.628 53.865 103.951 58.255 C114.112 63.614 124.181 69.089 134.15 74.802 C143.006 79.848 152.012 84.595 161.026 89.349 C169.928 94.048 178.765 98.834 187.513 103.817 C188.438 104.341 189.362 104.…

Is your file a scan?

A scanned drawing traces best after it is cropped and its background is flat: use binary mode and a higher filterSpeckle to drop paper grain. Tracing does not read text; if the scan contains words you need, convert it to TXT or DOCX with AI Deep Read (1 credit per page) instead.

Options and when to change them

mode
Use binary for line art, stamps and signatures that should be pure black on transparent; leave color for logos with several flat colours.
filterSpeckle
Raise it (default 4) when a scanned drawing produces hundreds of tiny paths from dust and noise; lower it if small deliberate marks vanish.
colorPrecision
Lower it (default 6) to merge near-identical shades into fewer paths; raise it when subtle colour steps must survive as separate shapes.
maxDimension
Increase it above 1,600 only for large scans of line art where thin strokes disappear after downsampling; tracing time grows with pixel count.

Do it yourself

vtracer (Python)

bash
from PIL import Image
import vtracer

img = Image.open("in.png").convert("RGBA")
svg = vtracer.convert_pixels_to_svg(list(img.getdata()), img.size, colormode="color", filter_speckle=4)
open("out.svg", "w").write(svg)

Transparent pixels are traced as black; composite onto a background colour first if the PNG has alpha.

potrace (black and white only)

bash
magick in.png -threshold 50% in.pbm && potrace -s in.pbm -o out.svg

Potrace produces one black shape layer; colours are lost and the threshold decides what survives.

PNG to SVG by API or MCP

The HTTP API and the MCP server run the exact engine this page uses (Image engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=png&to=svg.

curl
curl -X POST https://filetypeconverters.com/api/v1/convert \
  -H "Authorization: Bearer $FTC_API_KEY" \
  -F "file=@input.png" -F "from=png" -F "to=svg" \
  -F 'options={"dpi":96}' \
  --output output.svg

Options this engine accepts for PNG SVG

KeyApplies toTypeDefault
dpiReading PNGnumber96
widthWriting SVGnumber0
heightWriting SVGnumber0
fitWriting SVGcontain · cover · fillcontain
qualityWriting SVGnumber90
backgroundWriting SVGstring#ffffff
stripMetadataWriting SVGbooleantrue
API reference

When this is the wrong conversion

  • If the PNG is a photograph, keep it as PNG or convert it to WebP or AVIF; a trace of a photo is larger, slower and looks like a paint-by-numbers print.
  • If you need the original vector artwork, ask for the source file (AI, Figma, PDF) instead of tracing an export of it.
  • If the goal is editable text, run the PNG through AI Deep Read to get Markdown or DOCX; the trace keeps letters only as shapes.

PNG to SVG questions

Will PNG → SVG make my logo scalable?

Yes when the logo is flat colour on a plain background: each colour region becomes a path you can scale without blur. Anti-aliased edges are approximated by curves, so compare the result at large size before publishing it.

Why did a gradient become a single colour?

The tracer groups pixels into regions of similar colour and gives each region one fill. A smooth gradient has no boundaries to trace, so it collapses into one or a few flat bands depending on colorPrecision.

Why is the SVG bigger than the PNG?

Every region is written as a path with explicit curve coordinates. A 1200×800 illustration produced 70 paths and 34,597 bytes; photographs can produce thousands of paths and files many times the PNG size.

Does the trace keep transparency?

No. Alpha-zero pixels are traced as black regions, and the output SVG has no transparency of its own. Fill the background before converting, or delete the black path afterwards in a vector editor.