How to Convert a PNG Icon to SVG
5 min read
To convert a PNG icon to SVG, upload the PNG and download the SVG: every area of colour in the icon becomes a shape that you can scale to any size and fill with a new colour.
Our icon belongs to Sprout, a plant-care app we made up for this guide. It is a white line leaf on a rounded tile that fades from green to teal, saved as a 1024 pixel PNG, the size app stores ask for and the size image generators usually hand out. Sprout's website needed three things from it: the icon in the header, a favicon, and the leaf on its own, in one colour, for the menu.
A gradient tile and a white leaf
In the SVG the tile is one shape filled with a linear gradient of two colours, the same light green to teal we had drawn, and the white leaf sits over it. The whole file is 4.4 KB with 119 nodes. Outside the rounded corners there is nothing, as in the PNG, so the icon can sit on any background.
Inkscape gave us something to measure against: we fed it the same PNG in Trace Bitmap with eight colours. It cannot draw a gradient, so its tile is eight flat stripes running across the diagonal, and they show even at full size. That file has 844 nodes and weighs 39 KB.
A green drop left in the dark header
The website's header is dark navy, so the icon needed a navy tile there. We selected the tile in the editor and gave it a navy fill, and a green drop stayed inside the leaf.
That drop is a separate shape. The tile runs whole from corner to corner under everything, the white leaf covers it, and the green you see through the leaf is a third shape on top, with a small gradient of its own matched to that spot. Selecting it as well and filling it navy finished the dark version. In Figma, Illustrator or Inkscape that means selecting two shapes instead of one.
Sixteen pixels in a browser tab
A favicon tempts you to convert the file at hand, which for a website is often the 32 or 16 pixel PNG the browser tab shows. We converted Sprout at every size it ships in to see where that stops working.
The 180 pixel copy came back almost as the 1024 one did. At 32 pixels the rounded corners came back cut straight across, the stem bent and the vein got shorter. At 16 the leaf is a drop and the tile has notches at its corners.
So it pays to find the largest copy first. Most sites carry a 180 pixel apple-touch-icon, and their web manifest lists icons at 192 and 512 pixels; an app's store page shows its icon at 512 or 1024.
When we put the SVG on the page, it came out bigger than expected: with no width set, an img tag drew the 32 pixel favicon SVG 43 pixels wide. The file sets its width in points, and a point is a third larger than a CSS pixel. Set the width in your CSS or in the tag and it draws at that size.
The leaf as a line icon for the menu
For the menu we needed the leaf alone, coloured like the menu text, next to the other icons at 24 pixels. We had it as a 24 pixel PNG with a line 2 pixels thick and round ends, the way line icon sets such as Lucide are drawn.
With Trace style on Fill, the default, the SVG is one dark shape. Its outline goes around both edges of the line, so the line's weight is part of the shape and no stroke setting can change it, and the stem came back with a lump where it joins the leaf.
Switching Trace style to Centerline (Lite and above) gets you a stroke running down the middle of every line. The leaf came back as two strokes, the outline and the vein, 1.88 and 2.02 units wide on the 24 unit grid where we had drawn 2. Since they are strokes, the usual icon styling works on them: we changed their colour to currentColor, so the leaf takes the colour of the text around it, and their width to 1.5 for a lighter leaf. The tip came back a little rounder than we drew it.
Your own icons
Without an account, you can drop one of your icons into the home page demo and see what it turns into, as an image. To download the SVG you need a plan, Lite or higher. A converted icon is kept for 24 hours, or for longer if you pick a longer storage time, with its download link both in the workspace queue and on the dashboard. A whole icon set goes quicker as a batch, up to 30 files at a time from Pro, and the dashboard downloads the results as one ZIP.
The service takes PNG, JPEG, WebP and BMP files of 50 MB or less. For an icon, start from a PNG with transparent corners: a JPEG cannot hold transparency, so its corners arrive filled with whatever colour they were saved on. And look at each icon at the size it will be shown before it goes into the app.
Related guides
- How to Vectorize a Logo from a JPG or PNG — Turn a JPG or PNG logo into a vector file: how to check the result, when shading needs PDF or EPS, and how to get rid of the white background.
- Enlarge a Flyer or Poster Without Blur: JPG to Vector — A 1930s poster that survives only as a 1033 pixel JPG, converted to SVG and made ready for a 28 inch print: gradients, small type, the paper edge.
- Convert a PNG or JPG to SVG for Cricut and Silhouette — A five-colour badge from PNG to heat transfer vinyl: what lands on each mat, which pieces lie under others, and when to knock the layers out.