Image to SVG trace
Quantise a bitmap to N colours with median cut and trace it into SVG: one <path> per colour, or a rect grid. Editable, recolourable and crisp at any zoom — but it is tracing, not true vectorisation.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Choose a bitmap
The image is processed locally in the browser and never uploaded.
PNG / JPEG / WebP. This is colour-quantised tracing, not true curve-fitting vectorisation.
Trace result
The result is generated locally and ready to copy.
Pick an image, then press Trace.
What this tool does
- Trace a logo screenshot into SVG and recolour it in CSS without going back to the design tool.
- Flat art such as pixel sprites and icons often ends up smaller than the source and stays crisp at any zoom.
- Need a matching background pattern for a poster? Trace the image and change the fill colours.
- Drop a photo to 8 colours for a retro print look — the colour count is the style knob.
Example
Input
A 148 × 148 QR code PNG with 2 colours, trace longest side 256, output shape "one path per colour"
Output
Palette of 2 colours; 2 shapes; average error 0; the output contains two <path> elements and no <image> at all
This is colour quantisation plus connected-block tracing, not true vectorisation: pixels are grouped by colour and merged into rectangles, with no Bézier fitting.
Frequently asked questions
Is this real vectorisation?
No. Real vectorisation detects edges and fits Bézier curves back to the original outlines. This tool does median-cut colour quantisation plus connected-block tracing: the image is reduced to N colours, each colour is merged into row rectangles and emitted as a path. The upside is fully editable, recolourable, zoom-proof output; the cost is a stair-stepped outline and an element count that grows with image complexity.
Does the output contain an <image> tag?
No. Embedding the bitmap in <image> would make the file larger than the PNG and not vector at all. Every <path> here is built from rectangles, so the browser renders it as real vector geometry and you can recolour it in any editor.
How many colours should I use?
Flat art such as icons, logos and pixel sprites is fine with 4–8. Photos want 16–32; beyond that the file grows quickly for little visual gain. The colour count is the number of median-cut buckets, so more buckets mean lower average error.
Why is the trace size different from the source?
The image is downscaled to fit the "trace longest side" before quantisation. Output size is roughly proportional to pixel count, so a 2000 px photo would otherwise produce a tens-of-megabytes SVG. Raise the limit when you need more detail, at the cost of size and time.
Is my image uploaded?
No. The browser decodes the file into a bitmap, draws it on a Canvas to read the pixels, and the quantisation and tracing all run locally with no network requests.
Keywords:imgtosvgimage trace