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.
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
- Simple logos with 1–5 flat colours.
- Icons with clean edges.
- Line art and diagrams.
When it doesn’t:
- Photographs.
- Anything with gradients, shadows, or soft edges.
- Complex illustrations with many colours.
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
- Open Melt.
- Drag your source image (JPEG, HEIC, whatever) in.
- Set output to PNG.
- Resize to a reasonable working size (1024–2048 on the long edge).
- Click Compress.
- 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.
More Melt tips
-
Receive iPhone photos as JPG via AirDrop (not HEIC)
AirDropping photos from iPhone keeps landing them as HEIC files on your Mac. Here's how to get them as JPG instead.
-
AVIF on Mac — opening and converting AVIF images
AVIF is the next-gen image format that's even smaller than WebP. Here's how to open and convert AVIF files on macOS.
-
How to batch compress a folder of photos on Mac
Compressing 200 photos one at a time is its own form of suffering. Here's how to batch compress images on macOS.
-
What's the best image format for the web (and how to export it on Mac)?
JPEG, PNG, WebP, AVIF, SVG — they each have a job. Here's how to pick the right one for the web and export it from your Mac.