Trace an Image to a Block SVG screenshot

Trace an Image to a Block SVG

Rebuild a photo as an SVG of coloured rectangles, up to 64 blocks across, and download the source. A faithful block trace, not a smooth vectorisation.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your tab
No upload
No model
Refusals named

What this page does

Samples the picture on a square grid, finds the average colour of each block and writes the result as SVG rectangles. It is honest about what it is: a block trace whose detail is set by the grid, not a hand-drawn vector.

How to use it

Choose a file, set the options and press Render. Example: a 1200 × 800 PNG traced at 48 blocks and 6 colours becomes an SVG about 48 × 32 blocks, with runs merged into rectangles.

How it works

The image is downsampled by averaging each block, quantised to the number of colours you allow, and adjacent blocks with the same colour are merged into single rectangles. The output is plain SVG text with no embedded raster and no external reference, so it can be edited by hand.

What it refuses

A block count below 8, a colour count outside 2-16, a zero-size image, or a picture over the pixel cap is refused by name.

Where it runs

The picture is decoded and redrawn on a canvas in this tab: there is no upload, no network request and no model, so the pixels never leave your device. It opens PNG, JPEG, WebP, GIF, BMP and AVIF up to 16,000,000 pixels (16 MP) and 25 MB per file; anything larger is refused with its measured size rather than drawn blank.

Samples the picture on a square grid, finds the average colour of each block and writes the result as SVG rectangles. It is honest about what it is: a block trace whose detail is set by the grid, not a hand-drawn vector.

The image is downsampled by averaging each block, quantised to the number of colours you allow, and adjacent blocks with the same colour are merged into single rectangles. The output is plain SVG text with no embedded raster and no external reference, so it can be edited by hand. The picture is decoded and redrawn on a canvas in this tab: there is no upload, no network request and no model, so the pixels never leave your device.

Worked example: a 1200 × 800 PNG traced at 48 blocks and 6 colours becomes an SVG about 48 × 32 blocks, with runs merged into rectangles.

How to use the trace an image to a block svg

Choose an image file, set the options, and press Render. The result appears below the form.

Example: a 1200 × 800 PNG traced at 48 blocks and 6 colours becomes an SVG about 48 × 32 blocks, with runs merged into rectangles.

The picture is decoded and redrawn on a canvas in this tab: there is no upload, no network request and no model, so the pixels never leave your device.

  • Blocks across the long edge — one of 24, 32, 48, 64
  • Colours — 2 to 16
  • Background (hex or transparent)

What the canvas draws

Samples the picture on a square grid, finds the average colour of each block and writes the result as SVG rectangles. It is honest about what it is: a block trace whose detail is set by the grid, not a hand-drawn vector.

The image is downsampled by averaging each block, quantised to the number of colours you allow, and adjacent blocks with the same colour are merged into single rectangles. The output is plain SVG text with no embedded raster and no external reference, so it can be edited by hand.

  • Every option is declared by this page, so an unknown choice or an out-of-range number is refused by name before any pixel is drawn.
  • The preview and the download are the same canvas: what you see is the file you get.

What it refuses, and what it leaves out

A block count below 8, a colour count outside 2-16, a zero-size image, or a picture over the pixel cap is refused by name.

It opens PNG, JPEG, WebP, GIF, BMP and AVIF up to 16,000,000 pixels (16 MP) and 25 MB per file; anything larger is refused with its measured size rather than drawn blank.

  • Not the right page for: a smooth logo trace with curves, which needs a real vectoriser
  • Not the right page for: keeping fine detail such as text or faces

What to Expect

Best for

  • a lightweight placeholder that scales cleanly
  • pixel-art or mosaic-style artwork
  • an editable graphic from a photo

Not ideal for

  • a smooth logo trace with curves, which needs a real vectoriser
  • keeping fine detail such as text or faces

What this tool keeps

  • The overall composition and palette
  • A resolution-independent file
  • Editable rectangles with no embedded bitmap

What may need cleanup

  • Raising the block count for more detail
  • Deleting blocks by hand in the SVG editor of your choice

Common errors

  • A block count is a maximum per long edge, not per axis
  • Merging reduces the rectangle count but not the detail
  • Text in the source will not survive as text

Example use cases

  • A tiny SVG placeholder image
  • A posterised mosaic of a photo

Sample input

a 1200 × 800 PNG traced at 48 blocks and 6 colours

Sample output

an SVG about 48 × 32 blocks, with runs merged into rectangles

Who this is for

  • Web developers who want a small vector asset
  • Hobbyists making block art

Frequently asked questions

Does my image get uploaded anywhere?

The picture is decoded and redrawn on a canvas in this tab: there is no upload, no network request and no model, so the pixels never leave your device.

What is the maximum image size?

It opens PNG, JPEG, WebP, GIF, BMP and AVIF up to 16,000,000 pixels (16 MP) and 25 MB per file; anything larger is refused with its measured size rather than drawn blank. The limit exists because a browser tab has to hold the decoded bitmap in memory.

What happens if the file cannot be decoded?

The page refuses it by name — unsupported type, decode failure, zero pixels, or above the pixel cap — and shows the measured size rather than drawing a blank canvas. The file you chose stays selected so you can correct one option and try again.

Is this real vectorisation?

No, and the page says so. Each shape is the average colour of a square block, so the edges are blocky by construction. A smooth trace needs curve fitting, which is a different tool and a different quality claim.

Why is the SVG not smaller than my PNG?

A block trace with many colours can be larger than a compressed photo. It earns its keep as an editable, resolution-independent graphic, not as a smaller file.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.