Melt guide

Convert PNG to SVG on Mac (and when not to)

PNG to SVG isn't as simple as it sounds — here's what's actually possible on macOS, and when you should just stick with PNG.

4 min read

You found the perfect icon as a PNG, but you need it as SVG so it scales cleanly. Or your designer wants logos as SVG and only sent you PNGs. The bad news: PNG-to-SVG isn’t really a “conversion” — PNG is pixels, SVG is shapes, and getting from one to the other involves tracing.

Why this is harder than it sounds

PNG stores actual pixels. SVG stores mathematical descriptions of shapes (rectangles, curves, lines). Converting PNG to SVG means a tool has to interpret the pixels and guess at the shapes, which works well for simple flat graphics and badly for photographs or complex artwork.

When SVG makes sense

When it doesn’t:

For photos, just keep them as PNG or JPEG and resize as needed. SVG won’t help.

The native way

macOS has no built-in tool for PNG-to-SVG conversion. You need a third-party tracer.

The tracer tools

potrace — open-source command-line tracer, best for high-contrast graphics:

brew install potrace
# potrace needs a bitmap, so convert PNG to PBM first
magick logo.png logo.pbm
potrace logo.pbm -s -o logo.svg

The -s flag outputs SVG.

Vectorizer/Inkscape — open Inkscape, import the PNG, then Path → Trace Bitmap. Good GUI options for tuning the trace.

Adobe Illustrator — Object → Image Trace, then expand. Best traces of the bunch if you’ve already got it.

Where Melt fits

Melt doesn’t trace to SVG — that’s a fundamentally different operation from compression/conversion between raster formats. But Melt is the right tool before tracing: clean up your PNG (correct size, no antialiasing artefacts from a JPEG upbringing) so the tracer has a clean input. Download Melt.

Prep PNG for tracing in Melt

  1. Open Melt.
  2. Drag your source image (JPEG, HEIC, whatever) in.
  3. Set output to PNG.
  4. Resize to a reasonable working size (1024–2048 on the long edge).
  5. Click Compress.
  6. Feed the resulting clean PNG into potrace, Inkscape, or Illustrator.

When to just stick with PNG

If you need an icon that scales to small sizes only (16, 24, 32, 48, 64 px), don’t bother with SVG. Export PNGs at @1x, @2x, @3x and you’re done. SVG only wins when you need true unlimited scaling or you want to style the icon with CSS.

What you lose, what you keep

Tracing PNG to SVG always loses some fidelity — antialiasing turns into jagged stair-stepping unless you tune the trace carefully, gradients become solid colour bands, fine detail gets simplified. For genuinely vector-friendly source images (clean logos, simple icons), the loss is acceptable. For anything photographic, the result will look worse than the PNG you started with.

← All Melt tips