pngtoolskit.org
PNG and image utilities, in the browser
Say hi →

Convert PNG to SVG

vector trace or bitmap wrap · colour limit · copy or download · nothing uploaded

Two honest ways to get from PNG to SVG, and they're good for different things. Trace quantises the image to a handful of colours and emits real vector geometry that scales cleanly — ideal for logos, icons and flat graphics. Embed wraps the bitmap unchanged inside an SVG shell, which is what you want when a system demands an .svg file but the artwork is a photo.

Drop PNGs here

Multiple files allowed

    no files
    Ready.

    How the trace works

    The image is reduced to your chosen number of colours with a median-cut quantiser, then every horizontal run of identical colour becomes a <rect>, and rects are grouped under one <g fill="…"> per palette entry. The result is genuinely resolution-independent vector geometry — it stays razor-sharp at any zoom — but it is pixel-faithful rather than curve-fitted. You get blocky edges rather than the smooth Bézier outlines a dedicated tracer like Potrace produces.

    That trade-off is fine, and often preferable, for pixel art, flat icons, screenshots of UI, maps and diagrams. It's the wrong tool for turning a photograph into a clean logo — no automatic tracer does that well, and the honest answer there is to redraw it.

    Why the grid size matters

    Trace output grows with pixel count: every colour change along a row adds a rect. A 2000-pixel-wide photo can produce megabytes of markup that no browser enjoys rendering. The trace grid setting caps the longest side used for tracing (300 px by default) while the SVG's width and height stay at the original dimensions, so it still displays at full size. Raise it for more fidelity, lower it for smaller files. Fewer colours also means far fewer rects.

    FAQ

    Will this give me smooth curves like a real vectoriser?

    No. It produces axis-aligned rectangles that reproduce the pixels exactly. For curve-fitted outlines you need a Bézier tracer such as Potrace, usually with hand cleanup afterwards.

    Is embed mode a "real" SVG?

    It's a valid SVG file, but the artwork inside is still a bitmap — it will blur if you scale it up. Use it when a pipeline requires the .svg extension, not when you need true scalability.

    What happens to transparency?

    In trace mode, pixels below 50% alpha are skipped entirely, so the background stays transparent. In embed mode the PNG keeps its own alpha channel.

    Why is my traced file so big?

    Too many colours, too large a grid, or a noisy source. Drop to 4–8 colours and a 200 px grid; for photographic input, Posterize or Reduce colors first so the runs get longer.

    Can I edit the result in Illustrator or Figma?

    Yes — the groups and rects import as ordinary editable shapes. Merging them into single paths per colour is a one-click union in either app.