The short answer
To convert a PNG to SVG in Inkscape, import the PNG, select it, open Path, Trace Bitmap, pick a trace mode, preview the result, click Apply, delete the original PNG, and save the file as SVG. Inkscape is free desktop software for Windows, Mac and Linux, and this site does not run Inkscape, so the conversion happens on your computer. A PNG is a raster image made of pixels, while an SVG stores vector paths, so the conversion traces the pixels into shapes. PNG files trace well in Inkscape because they are lossless and often carry transparency, which the tracer treats as empty space, so a logo on a clear background traces without a white box. For a quick trace with no install, use the PNG to SVG converter on this site instead.
What converting PNG to SVG in Inkscape actually does
A PNG file stores a grid of pixels. An SVG file stores shapes as paths, curves and fills. Converting PNG to SVG means tracing, which groups similar pixels into regions and fits curves around them. The result is a new drawing that looks like the original, not a pixel perfect copy of it. Tracing works best when the picture is made of flat areas of color with clear edges, such as a logo, an icon or line art.
PNG is a strong starting point for tracing because it is lossless. Unlike a JPG, a PNG has no compression blocks or ringing around the edges, so the tracer sees clean boundaries. PNG also supports full transparency through an alpha channel, and the tracer treats transparent areas as empty, so a logo on a clear background traces as the logo alone, with no white box behind it.
Inkscape is a free and open source vector editor for Windows, Mac and Linux. Its Trace Bitmap tool does the tracing, and the same program then lets you edit the paths, fix the colors and save the SVG. The file stays on your computer, and there is no account or payment. This site does not run Inkscape, so the steps below happen in the Inkscape program on your computer, not in a browser tab.
Prepare the PNG first
- Use the largest and sharpest copy you have. A small or blurry PNG traces as wobbly curves, and no trace setting can recover detail that is not in the file.
- Pick flat artwork. Logos, icons, text art and simple illustrations trace well. Photos, screenshots of photos and images with soft shadows or gradients trace poorly, so keep those as PNG or JPG.
- Check whether the background is truly transparent or just white. Open the PNG in a browser tab and look at it against a dark background, or check it in an image editor. A white background traces as a white shape, while true transparency traces as nothing.
- Crop the image tightly to the artwork before you trace, so stray edges and watermarks do not become paths.
- If the PNG came from a website download, check that it is the full size image and not a small thumbnail. A thumbnail downloaded from a web page traces as rough curves.
Method 1: trace a one color PNG with a single scan
A single scan makes one set of paths from the whole image, which suits a one color logo, a black and white drawing or lettering. Brightness cutoff is the mode the Inkscape manual recommends most often, and it turns the picture into a silhouette that follows the shape of the artwork.
- Open Inkscape and import the PNG with File, Import. Choose to embed the image, so it is stored inside the Inkscape file.
- Click the imported PNG to select it. The Trace Bitmap command works on the selected image only.
- Open Path, Trace Bitmap, or press Shift+Alt+B. The Trace Bitmap dialog opens.
- On the Single scan tab, pick Brightness cutoff. Set the threshold to 0.450 to start, then click Update to refresh the preview. Raise the threshold to keep more of the artwork, or lower it to drop faint marks.
- When the preview looks right, click Apply. The vector result appears exactly above the original picture, so drag it aside with the Selector tool to compare the two.
- Compare the traced shape with the original PNG. Zoom in and check the edges, corners and lettering.
- Delete the original PNG from the canvas only after the comparison looks right, then save with File, Save As. See section 7 for the save options.
Method 2: trace a color PNG with multiple scans
A color logo or illustration needs one set of paths per color, which is what the Multiple scans tab does. It gives a more detailed result than a single scan, but it creates a separate stacked object for each scan, so a 10 color trace leaves 10 objects to manage. Start with few colors and add more only when detail is lost.
- Import the PNG and select it, then open Path, Trace Bitmap, as in Method 1.
- Open the Multiple scans tab and pick Colors. Set the number of scans to the number of colors in the artwork, starting low, for example 4 to 6 for a flat logo.
- Click Update to refresh the preview, adjust the count until the colors look right, then click Apply.
- Ungroup the result with Object, Ungroup, or Shift+Ctrl+G, so you can move and edit the color shapes separately.
- Delete the background shape if the trace made one, and delete any stray specks from the edges of the image.
- Check the colors against the original PNG. A traced color is a flat fill taken from the pixels, so a gradient in the PNG becomes bands of flat color.
Keeping transparency in the trace
Transparency is the main reason many people start with a PNG, so check it before you save. A PNG with a truly transparent background traces only the visible artwork, because the tracer sees transparent areas as empty. Open the finished SVG in a browser against a dark background as well as a light one, because a white filled shape that looked invisible on white shows up at once on dark.
A PNG that only looks transparent because it sits on a white page is different. The white is part of the image, and the tracer turns it into a white shape. Recent versions of Inkscape offer a Remove background option in the Trace Bitmap dialog for that case. Tick it when your PNG sits on a solid background you want dropped. If your version has no such option, delete the background shape after ungrouping the trace, or remove the background in an image editor before you trace.
SVG files have no background by default, so a traced logo with no background shape stays transparent wherever you place it, on a web page, in a document or on a cutting machine.
Clean up the traced paths
- Ungroup the trace with Shift+Ctrl+G, then delete stray specks, dust marks and background shapes left over from the edges of the image.
- Use Path, Simplify sparingly on wobbly curves. It removes nodes, which smooths the shape, but too much simplifying rounds off corners and small details.
- Retype lettering with a real font in Inkscape instead of tracing the letters. Traced text looks right at a glance but edits badly and prints unevenly.
- Check the node count. A trace with thousands of nodes makes a large file that is slow to open and hard to edit, so re-trace with fewer colors or a higher threshold before you simplify.
- Leave the Smooth option off for most PNG files. PNG is lossless and usually has no compression noise, so smoothing adds little. It helps only when the edges look rough or stepped.
- For outlines only, use Edge detection instead of Brightness cutoff. It traces the contours of a shape rather than filled regions, which suits wireframes, line art and outline only icons.
Save and check the SVG
- Save with File, Save As. Choose Plain SVG for a clean file without Inkscape specific data, which suits a website or a cutting machine. Choose Inkscape SVG if you plan to keep editing the file in Inkscape later.
- Reopen the saved SVG in a browser. It should show the traced artwork alone, with no copy of the original PNG inside it.
- Zoom in to 200 percent or more. Lines should stay smooth and corners should stay sharp.
- Try the SVG where it will be used, such as a web page, a Cricut project or a laser cutter, before you delete anything else.
- Keep the PNG as the master file. Tracing is a one way step, and you need the original if you ever want to trace again with different settings.
Inkscape or the converter on this site
| Job | Inkscape | Converter on this site |
|---|---|---|
| Quick trace, no install | No, install Inkscape first | Yes, it runs in the browser |
| Full control of trace settings | Yes, every mode and threshold | No, a small set of settings |
| Edit paths and text after tracing | Yes, a full vector editor | No, use the SVG editor for small code edits |
| Transparent background | Yes, alpha is traced as empty | Yes, transparency is preserved |
| Photos | No, tracing a photo makes a rough file | No, keep photos as PNG |
| Offline work | Yes, once installed | No, it needs the browser page |
Sources
Written by Shahab Uddin. Published ; updated . Corrections are welcome through the contact page.