0: original colors · 100: two colors

Choose an image, or try an example.

Download SVG

Image comparison

OriginalSVG output
Choose an image to compare
Choose an image to compare
OriginalSVG output

1 source pixel = 1 SVG unit. Color removal uses an exact RGB match before posterization; #FFF works too. Uncheck removal to keep white. Fully transparent pixels stay transparent.

Original on the left, SVG output on the right. Drag either image to pan both together, scroll or pinch to zoom. Everything runs locally; preview changes do not affect the SVG export.

How it works

  1. Drop your image

    Drag a PNG, WebP, BMP, GIF or JPEG onto the upload area, click it to browse, or pick one of the examples. Images up to 1024 × 1024 pixels are supported and never resized.

  2. Tune the output

    Remove a background color, merge same-color pixels into compound paths, reduce the palette with posterization, keep or flatten partial transparency, and trim empty edges. The preview updates instantly.

  3. Compare and download

    Inspect the original and the SVG side by side, zoom in, hover any shape to see its exact color, then download the SVG.

Features

  • 1 pixel = 1 SVG unit

    Width, height and viewBox match your image. All geometry uses integer coordinates with horizontal and vertical edges only: no curves, strokes, approximation or embedded raster.

  • Merged compound paths

    Pixels of the same color are traced into one compound path per color, with holes preserved through the even-odd fill rule. Flat artwork usually gets much smaller.

  • Posterization

    Weighted median-cut color reduction, from all original colors down to two, without dithering or moving a single pixel.

  • Transparency

    Fully transparent pixels are omitted; partial alpha becomes fill-opacity, or can be flattened to fully opaque.

  • Trim transparent edges

    Optionally crop empty outer rows and columns while keeping interior holes and faint pixels intact.

  • Private by design

    Conversion runs in a Web Worker in your browser. Your images are never uploaded to a server.

Why not use Image Trace or Trace Bitmap?

General-purpose vectorizers such as Illustrator Image Trace, Inkscape Trace Bitmap or potrace are built for photos and scanned drawings. They fit smooth curves through the outline of each color region, so the hard square corners of pixel art turn into rounded blobs, thin one-pixel lines wobble or disappear, and neighboring colors bleed into each other.

Pixel to SVG does no fitting at all. It walks the exact boundary between pixels of different colors on the integer grid, so the SVG is a lossless copy of the image: scale it to any size and every pixel stays perfectly square and sharp.

Frequently asked questions

Is the conversion really lossless?

Yes. Each source pixel becomes exactly one SVG unit and colors are copied byte for byte (unless you choose to posterize). The geometry is an exact union of pixel squares, so rendering the SVG at an integer scale reproduces the original image.

Are my images uploaded anywhere?

No. Decoding, color processing and SVG generation all run locally in your browser. Nothing is sent to a server.

Which image formats can I convert?

PNG, WebP, BMP, GIF and JPEG, up to 1024 × 1024 pixels. Lossless PNG is recommended: JPEG compression adds noise colors, and animated formats use their first frame.

How do I remove the background?

Enable “Remove this exact color” and enter the background color, for example #FFFFFF. Only pixels with exactly that RGB value are removed. Pixels that are already transparent always stay transparent.

Why is my SVG file large?

Images with many isolated colors, such as dithered artwork, need many separate shapes. Posterization reduces the number of colors, and merging same-color pixels keeps flat areas compact.

Will the SVG look sharp everywhere?

The SVG requests crisp edges, so integer zoom levels align perfectly with screen pixels. At fractional scales, some viewers may anti-alias the edges between shapes slightly.