Skip to content
UniKit

Image mosaic

Pixelate an image with an adjustable block size: each block is filled with its average colour (alpha weighted), blocks from 2 to 128 pixels, exported as PNG or JPEG.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Images are processed locally in your browser with Canvas and never uploaded.

12 px

Each block is 2–128 px; larger blocks blur more because every pixel in a block becomes the block average.

Pick an image first (PNG / JPEG / WebP / GIF all work).

Result details

Result details

Pick an image and set a block size — the mosaic size and file size show up here.

What this tool does

  • Privacy masking: pixelate ID numbers, licence plates or faces with large blocks — the bigger the block, the less recognisable.
  • Pixel-art bases: a 2–8 px block size gives a blocky low-resolution look that the pixel-art tool can then quantise further.
  • Pre-compression: mosaics create many identical regions, so both PNG and JPEG shrink noticeably.
  • Different from the pixel-art tool: mosaic only averages blocks and keeps the original palette; pixel art also quantises colours and scales to a pixel grid.

Example

Input

A 2×2 image of [0,0,0], [100,100,100], [200,200,200] and [255,255,255] with block size 2

Output

All four pixels become [139, 139, 139, 255]

Straight from the pure mosaicImage logic: (0+100+200+255)/4 = 138.75, rounded to 139. Pixels inside a block are always identical and the output differs from the source.

Frequently asked questions

How is the mosaic computed?

The image is divided into a grid of blocks; each block averages its pixels (RGB weighted by alpha, alpha averaged separately) and the whole block is filled with that colour. Every pixel inside a block ends up identical.

Which block size should I use?

16 px or more for privacy masking, 2–8 px for pixel-art bases, and 32–128 px when you want only large colour fields. The allowed range is 2–128 and out-of-range values report an error.

What happens to transparent areas?

A fully transparent block stays fully transparent. For semi-transparent pixels the colour is alpha weighted so transparency cannot darken the result, while the alpha is averaged over the block.

Does the output size change?

No. Mosaicking only rewrites pixel values, so width and height stay the same. Edge blocks that do not divide evenly simply average the pixels they do contain — nothing is padded.

Are my images uploaded?

No. Pixels are read through the canvas and processed entirely in the browser; there is no upload endpoint on the page.

Keywords:mosaicpixelate

Related tools