What actually changes
A PNG image is a rectangle of pixels. A 400 by 400 PNG holds 160,000 colour values and nothing else. There's no notion of "circle" inside it. There are just pixels that happen to sit in a circle. Enlarge the file and the browser stretches those pixels, so a curve turns into a staircase.
An SVG holds geometry instead. A file describing the same circle is a handful of numbers: centre, radius, fill colour. Say "800 pixels wide" and the renderer works out the arithmetic. The curve stays a curve. That's why a logo you only have as a PNG goes fuzzy on a banner while the SVG version doesn't care how large it gets.
The source file has no idea which pixels belong together, so the converter has to:
- draw boundaries between regions of colour that are similar but not identical
- decide how many control points each boundary needs before it looks smooth
- pick one fill colour per region, even where the original shaded gradually
Hand the same PNG to two tools and they'll disagree about all three. The choice of tool matters more here than in most conversions.
Files that are worth converting
Tracing pays off when the picture is made of shapes a human would recognise. Flat colour and hard edges are the good case:
- Logos and brand marks you only have as a bitmap, usually because a client sent a screenshot or the design source is long gone
- Icons for a UI kit, where you'll need several sizes anyway
- Line art, signatures and lettering, especially if a plotter or vinyl cutter will follow the outline
- Clip art and illustrations that have to print cleanly at poster size
- Decorative patterns that need to tile at whatever size the layout calls for
Start from the best bitmap you can find. A tracer follows the noise it's given, so a logo saved as JPEG at quality 60 has ringing around every edge, and that ringing comes back as a fringe of extra shapes. A PNG straight from the source beats a screenshot of the same page, every time.
Files that are not
Photographs are the case people try first and regret. A photo of a face has millions of slightly different colours. Turn that into flat shapes and you get thousands of small paths, a file far larger than the photograph, and a result that lands somewhere between a poster and a mudslide. It's a real technique, but it's a style, and it wants a tool built for it.
Two more cases to skip:
- Photos you'll display as photos. A JPEG or WebP will be smaller and look better, and vectorising buys scalability you didn't ask for.
- Screenshots of text. If the image is a paragraph, you want OCR, which gives you selectable text. Tracing a screenshot of text gives you outlines of letters that nobody can edit or search.
The two ways to do it
Automatic tracing
Illustrator's Image Trace, Inkscape's Trace Bitmap and every converter you've ever opened in a browser tab work the same way underneath: analyse the bitmap, group the colours that look alike, and fit curves around the groups. That's seconds to a minute. On flat artwork you often can't tell the result from a hand redraw. On a photograph you get the pile of shapes described above.
There's a split inside that family, and it only shows once you leave flat colour behind. Rule-based tracers look at pixel colours and edges and wrap curves around whatever they find, which is how Image Trace and Trace Bitmap work. The other sort runs a model over the image and asks what's actually there, region by region. It's a second or two slower, and it'll hold a shape together where a rule-based tracer shatters it into fragments.
Redrawing by hand
A designer opens the bitmap, drops the opacity, and draws clean geometry on top. An hour for a simple mark, and a lot longer for anything else. You get the fewest possible nodes, every curve deliberate. For a logo headed onto the side of a building, that's the answer. When you need a cut file before lunch, it isn't.
A reasonable rule: trace first, look at what comes back, and only pay for a redraw if the curves still bother you.
How to tell a real trace from a wrapped bitmap
Plenty of tools "convert" a PNG by embedding the original pixels inside an <svg> tag. The extension changes and nothing else does, which means it'll scale exactly as badly as the PNG did. Four ways to check:
- Open it in a text editor. A real vector file is a list of
<path>,<rect>and<circle>elements with coordinate numbers. A wrapped bitmap is one<image>element with a long string of base64, or anhrefpointing at another file. - Zoom in to 800% in a browser. Real vectors stay sharp and the edges resolve into clean curves. A wrapped bitmap breaks into visible squares.
- Compare the file sizes. A plain logo traced properly lands in the tens of kilobytes. If a simple logo "converted" to a 2 MB SVG, something is carrying the original image along.
- Count the nodes. Open it in a vector editor and look at the path count. A clean trace of a simple mark uses dozens. Thousands of tiny paths is a sign the tracer was set to follow every pixel edge instead of looking for shapes.
Getting a better result from any converter
- Crop the margins. Empty space around the subject is still analysed, and it dilutes the detail the tracer can afford elsewhere.
- Clean the background. A logo photographed on a desk will produce shapes for the desk. Cut it out first, or use a source with a transparent background.
- Sit around 1000 to 2000 pixels on the long edge. That's enough detail for the tracer to find edges. Much larger mostly costs time.
- Reduce the colours if you can. Five flat colours trace cleanly. Five million gradients do not.
- Check contrast between fill shapes. Two similar blues may merge into one shape. If that matters, raise the difference before you convert.
What to do with the SVG afterwards
- Optimise it. Editors write a lot of metadata, comments and over-precise coordinates. SVGO, or Inkscape's "Optimised SVG" save option, will cut the size substantially without touching what you see.
- Keep a viewBox. A viewBox is what lets the file scale. Removing it to force a fixed size is a common way to break a good SVG.
- Text needs outlining. If the file contains live text, it'll render in whatever font the viewer has. Convert text to paths before you ship it.
- Check it on the background it will live on. Single colour marks traced from a white background often have no background fill, so they vanish on a dark page.
- Export a PNG at the size you need when something insists on a raster file.
A workflow that works
- Find or rebuild the cleanest bitmap version you can.
- Crop it, clean the background, and set the long edge to about 1500 pixels.
- Trace it.
- Open the result in a vector editor and delete stray specks.
- Optimise the file and check the size.
- Test the file at 200% on a dark background.
Questions that come up a lot
Does the SVG come out sharper than the PNG?
No. It comes out scalable. If the original was blurry, the trace is a sharp drawing of something blurry. You can't read detail back out of a PNG that never had it.
Will the SVG file be smaller?
For flat art, usually yes, and often by a lot. For detailed pictures, usually no. Describing thousands of shapes takes more numbers than a compressed pixel grid did.
Can I turn it back into a PNG?
Yes, and you can pick the exact pixel size when you do. Our SVG to PNG converter runs in your browser and keeps the transparency.
Does converting change my original file?
No. The PNG you start with stays exactly as it was. A conversion produces a new file, and you'll want to keep both.
Where does my image go while it converts?
Some converters run the trace inside your browser tab and some send the image to a server, and the two behave differently enough that it's worth checking before you upload anything. Ours is the second kind. The image goes up once to the tracing engine, the temporary copy on this machine is deleted the moment the conversion finishes, and the engine clears its own copy within a day. Only the shapes come back, so the preview, the download and everything you do with the file afterwards happen in your browser.
Neither approach is better in every case. A converter that keeps the image in the tab is the right choice for a document you can't send anywhere at all, and the trade is that the work has to fit inside a browser, so tracing a photograph is slower and the result is usually rougher. A server-side trace handles a hard image better, and it means the file left your machine. The pick depends on the file.