PNG to SVG
Trace a logo, icon, signature or line drawing from PNG or JPG into a scalable SVG, with presets and a compare slider.
Drop an image here or paste it, or
Your images never leave your device
Traced in this browser · JPG, PNG, WebP, GIF, BMP, AVIF, HEIC or TIFF · one at a time
2 to 64; fewer give a simpler, smaller SVG.
Removes the colour around the edges. Clear areas of the image stay clear either way.
Turns a PNG, JPG or other picture into an SVG: shapes of flat colour that stay sharp at any size, for a logo that must print large, a signature to place in a document, or an icon to edit in a vector program. Choose what the image is, compare the SVG with the original under the slider, zoomed up to 4×, and download the file or copy its code. It works best on logos, icons, line art and signatures, which are made of a few flat colours. A photo becomes a poster of flat colour areas, never a copy of the photo. The image is traced in your browser and never uploaded.
How to use it
Image type sets the colours and detail for the kind of picture, as the table below lists. Each image you open starts as Logo or icon, or as Photo (posterised) when it has the many shades of a photo. Once you choose a type yourself, it stays for every image you open until you close the page or reset the options. Colours (2 to 64) starts at the preset's count: fewer colours give a simpler, smaller SVG, and merge the in-between shades that smooth edges leave. If the image has fewer colours than asked, only those found are drawn, and the count under the result says how many.
Transparent background removes the colour that covers most of the image's border, when it covers at least 60% of it, so a white or slightly noisy background goes. Where no colour does (a photo to its edges), nothing is removed and the result says so. Areas that are clear in the image itself stay clear either way.
Under the result are its file size, paths and colours. A result of more than 20,000 paths or 2 MB is flagged: such a file is slow to open and edit. A trace still running after 60 seconds is stopped; Stop ends one sooner. Options are remembered on this device.
How the image is traced
The image is first resized so its long side falls within the preset's trace size. A small logo is enlarged smoothly, so the outlines follow its edges rather than its pixel steps; a large photo is reduced. The SVG keeps the original's size in pixels as its width, height and viewBox either way.
Its pixels are then grouped into the chosen number of colours. The starting colours are the most common ones that differ most from each other, so a small accent colour in a logo keeps its own group instead of being averaged into its neighbours; the groups are then refined by k-means. With two colours, the image is split at Otsu's threshold on lightness instead, which separates ink from paper even under uneven light.
Each colour is a layer. Its areas are outlined, outlines too short to matter are dropped as specks, and each outline is fitted with straight lines and quadratic curves that stay within the preset's tolerance, by the open-source imagetracerjs. The largest areas are drawn first, and each area is edged in its own colour, so no hairline gaps show between neighbours. Coordinates are written to one decimal place.
The presets
| Image type | Colours | Background | Tolerance | Trace size (long side) |
|---|---|---|---|---|
| Logo or icon | 8 | Kept | 1 px, sharp corners | 800–1,600 px |
| Line art or signature | 2 | Removed | 2 px | 1,600 px |
| Illustration | 24 | Kept | 0.5 px, sharp corners | 800–1,600 px |
| Photo (posterised) | 16 | Kept | 1 px, smoothed first | 800–1,600 px |
Frequently asked questions
See also
- SVG to PNG — to turn the SVG back into a PNG at any size or DPI.
- Signature Maker — to clean up a signature photo before tracing it.
- Background Remover — to cut a logo or subject out of a busy background first.
- Image Upscaler — to enlarge a tiny, blurry logo before tracing it.