PNG to SVG Converter
Drop a PNG or JPG, pick the image type and colour count, and download a traced SVG — vectorized on your device, nothing uploaded.
- Free
- No account
- Runs in your browser
- Nothing uploaded
Runs entirely in your browser — your input is never uploaded, logged, or stored.Privacy policy
What is PNG to SVG Converter?
This PNG to SVG converter traces a raster image — PNG, JPG, WebP, GIF or BMP — into an SVG made of filled vector shapes, entirely in your browser. It is for people who need a scalable version of a logo, icon, signature or flat illustration and only have a pixel image of it.
A PNG is a grid of coloured pixels; an SVG describes shapes with coordinates, so it stays sharp at any size. There is no information inside a PNG that says where the shapes are, so conversion means guessing them. This tool uses imagetracerjs, an open-source tracer, in five steps: it reduces the image to a small palette of colours (the Colours setting, 2 to 64) with k-means clustering, separates each colour into its own layer, finds the outline of every connected region, fits those outlines with straight lines and quadratic curves, and writes each region as an SVG path filled with its palette colour. Fully transparent areas are left out, so a logo on a transparent background stays transparent.
The three image types set how the tracer behaves. Logo / icon starts at 4 colours, squares off right-angle corners and drops specks shorter than 8 outline points, which removes most anti-aliasing fuzz. Illustration starts at 16 colours, keeps smaller details and lets corners round naturally. Detailed starts at 48 colours and uses the library's own "detailed" settings: nothing is discarded and lines and curves are fitted twice as tightly, which gives a closer match and a much bigger file. If the result has blotches of the wrong shade, raise the colour count; if it has too many tiny shapes, lower it.
Because tracing cost grows with the number of pixels, images over 1 megapixel (for example 4000 × 3000) are shrunk to about 1 megapixel before tracing, and the SVG's width and height are then set to the original dimensions exactly, so it drops into place at the same size. The tool tells you when this happens. The trace itself runs in a background worker so the page stays usable.
Be clear about what you get. The SVG is an approximation redrawn from pixels, not the original vector file a designer made: edges are re-fitted, gradients become bands of flat colour and very small text may blur into blobs. Tracing works best on flat artwork with a few solid colours and crisp edges. It is a poor fit for photographs — a photo has thousands of subtly different colours and no clean shapes, so the tracer either posterises it into a few flat areas or produces tens of thousands of tiny paths, often several megabytes larger than the original. Keep photos as PNG or JPG; if you have access to the source file (AI, EPS, PDF or SVG) of a logo, use that instead of tracing.
Everything happens on your device: the image is decoded, traced and turned into an SVG in the browser tab. You can confirm in your browser's developer tools (Network tab) that no request carries your image — the page does load Google Analytics, but nothing about your file is sent.
1. The file's first bytes are checked to confirm it is really PNG, JPG, WebP, GIF or BMP, whatever its name says; files over 30 MB are refused. 2. The browser decodes the image (for animated images, the first frame). If it is larger than 1,000,000 pixels it is drawn smaller, keeping its aspect ratio, so that it has at most about 1 megapixel. 3. The RGBA pixels are sent to a Web Worker running imagetracerjs 1.2.6 with the preset's options: palette size from the Colours box, deterministic colour sampling, 3 k-means cycles, and the preset's line/curve error thresholds (1 or 0.5 px), speck threshold (8, 4 or 0 outline points) and right-angle setting. 4. The tracer quantises colours, outlines each colour layer, and fits straight lines and quadratic Bézier curves. Coordinates stay in traced pixels. 5. The SVG is tidied: fully transparent shapes are removed, opacity values are rounded to 3 decimals, the viewBox is set to the traced size and width and height to the original image size, so a downscaled trace is stretched back to exactly the original dimensions (any aspect difference is under one traced pixel). Each shape also carries a same-colour outline one traced pixel wide, which closes hairline gaps between neighbouring shapes but makes every shape about half a pixel fatter on each side — 1-pixel lines come out slightly thicker. 6. The result is shown next to the original as an image, and offered as a .svg download and as copyable SVG code.
| Logo / icon | Illustration | Detailed | |
|---|---|---|---|
| Starting colours | 4 | 16 | 48 |
| Specks removed | Under 8 outline points | Under 4 outline points | None |
| Corners | Squared off | Left to curve fitting | Squared off |
| Fitting tolerance | 1 px | 1 px | 0.5 px |
| Best for | Logos, icons, signatures, text | Cartoons, flat drawings, clip art | Detailed art where file size matters less |
Worked examples
- A 12 × 12 px image with a red 6 × 6 square on white, traced as Logo / icon with 2 colours → an SVG with exactly 2 paths, filled rgb(255,0,0) and rgb(255,255,255); the red path is exactly the square's edges, M 3 3 L 9 3 L 9 9 L 3 9 L 3 3 Z.
- A 4000 × 3000 px PNG → traced at 1154 × 866 px (about 1 megapixel) and saved as a 4000 × 3000 SVG, with a note saying it was reduced.
- A logo whose left half is blue and right half fully transparent → an SVG with a single blue shape; the transparent half stays transparent rather than becoming an invisible path.
- icon.png that is really an SVG file → no trace; the tool says the file is actually an SVG.
How to use PNG to SVG Converter
- Click "Choose a PNG or JPG image", drop the file onto the box, or paste it with Ctrl+V (Cmd+V on a Mac).
- Pick an Image type — Logo / icon, Illustration or Detailed — and adjust Colours if you like (2–64).
- Click "Convert to SVG" and compare the Original and SVG previews side by side.
- Click "Download .svg" to save the file, or "Copy SVG code" to paste the markup into your code or design tool.
Common errors
- The file is not really a PNG or JPG — a file can carry the wrong extension, for example an SVG, HEIC or PDF renamed to .png. The tool reads the file's signature and names the real format; an SVG is already a vector and needs no tracing.
- The SVG looks blotchy or has the wrong shades — the palette is too small for the image. Raise the Colours number, or switch to Illustration or Detailed.
- The SVG is huge or full of tiny specks — the image is a photo, has gradients, or is a noisy JPG. Lower the colour count, use Logo / icon, or keep the image as PNG/JPG; tracing is not meant for photos.
- Small text came out as blobs — letters only a few pixels high do not have enough pixels to trace. Start from a larger image of the logo.
- "Nothing was traced — the image appears to be fully transparent." — every pixel has zero opacity, so there are no shapes to draw. Check you picked the right file.
- The image was reduced before tracing — anything over 1 megapixel is traced at about 1 megapixel so the browser stays responsive. For flat logos this rarely matters; for fine detail, crop to the part you need first.
FAQ
How do I convert a PNG to SVG for free?
Drop the PNG onto this page, choose Logo / icon, Illustration or Detailed, and click "Convert to SVG". Then download the .svg or copy its code. It is free, needs no sign-up and adds no watermark.
Can I convert a JPG to SVG as well?
Yes — JPG, WebP, GIF and BMP are accepted as well as PNG. JPG compression adds faint noise around edges that can trace as extra specks, so if you have a PNG of the same image it will usually give a cleaner SVG.
Is the SVG a true vector version of my logo?
It is a true vector file, but it is an approximation redrawn from the pixels, not the designer's original. Edges are re-fitted with lines and curves, and gradients become flat bands. For a clean logo with a few solid colours the result is usually very close; if you can get the original AI, EPS or SVG file, that is always better.
Why does my photo look bad as an SVG?
Photos are made of thousands of subtly varying colours with no clean edges, and a tracer can only describe flat-coloured shapes. You get either a posterised look or a huge file with tens of thousands of tiny shapes. Keep photos as PNG or JPG — SVG tracing is for logos, icons and flat art.
Is my image uploaded to a server?
No. Decoding and tracing happen in your browser, in a background worker on your own device. You can check in your browser's developer tools, under Network, that no request carries your image.
How many colours should I choose?
Use roughly the number of distinct colours in the artwork, plus one or two for the anti-aliased edges: 2–4 for a one-colour logo on a background, 8–16 for a cartoon. Too few merges colours together; too many creates extra shapes and a bigger file.
Does PNG to SVG keep a transparent background?
Yes. Fully transparent areas are left out of the SVG, so the background stays transparent. Semi-transparent edge pixels are grouped with the nearest palette colour and keep a matching opacity.
Is there a size limit?
Files up to 30 MB are accepted. Images over 1 megapixel are traced at about 1 megapixel, and the SVG keeps their original width and height, because tracing cost grows with the pixel count and everything runs on your device.
Related tools
- JPG to PNG ConverterDrop JPG or JPEG images and download them as lossless PNG files — converted on your own device, nothing uploaded, no watermark.
- PNG to ICO ConverterDrop a PNG, JPG, WebP or SVG, tick the icon sizes you need, and download one favicon.ico containing all of them — made on your device.
- SVG to PNG ConverterDrop SVG files, choose a scale or an exact width and a background, and download sharp PNG or JPG images rendered on your device.
- Image ResizerDrop images, choose a percentage, a width, a height or an exact pixel size, and download the resized copies — all processed on your device.
Prefer AllUtil on Google
One click adds AllUtil to your Google preferences. You'll see our tools highlighted with a Preferred badge in Search and AI answers.