Image pixelator
Pixelate an image with 2–128 px blocks: by default each block copies its top-left pixel for crisp colour fields, with a block-average mode available; transparency can be preserved or forced opaque, 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.
Each block is 2–128 px; larger blocks look chunkier because every pixel in a block is unified.
Pick an image first (PNG / JPEG / WebP / GIF all work).
Result details
Pick an image and set a block size — the pixelated size and file size show up here.
What this tool does
- Crisp colour fields: the default "top-left pixel" mode keeps the original palette, makes every pixel in a block identical and leaves edges sharp.
- Switch to "block average" when you want a softer result — the behaviour then approaches a mosaic, but you keep control of the block size and the alpha switch.
- Masking at scale: block sizes of 32–128 leave only large colour fields, good for an unrecognisable placeholder.
- Different from the mosaic tool: mosaic always averages a block, while this tool copies the top-left pixel by default, so the two produce different pixels for the same block size.
Example
Input
A 2×2 image of [0,0,0], [40,0,0], [0,40,0] and [40,40,0] with block size 2 in top-left mode
Output
All four pixels become [0, 0, 7, 255] — the value of the top-left pixel
In sample mode the pure pixelateImage logic writes the top-left pixel into the whole block. Switching to average mode yields [20, 20, 7, 255] for the same block, proving the two modes really differ.
Frequently asked questions
How is this different from the mosaic tool?
The colour source differs. Pixelation copies each block's top-left pixel, giving hard-edged colour fields that keep the original palette; mosaic averages the block, which looks softer and blurrier. For the same block size the outputs are always different.
What does "preserve original transparency" do?
When ticked (the default) the block alpha is averaged so transparent areas stay transparent. Untick it and every output pixel gets alpha 255, producing a fully opaque blocky image.
Which block size should I use?
2–8 px for pixel-art assets, 8–24 px for moderate chunkiness, and 32–128 px when you only want large colour fields (masking). The allowed range is 2–128 and out-of-range values report an error.
Does the output size change?
No. Pixelation only rewrites pixel values, so width and height stay the same. Edge blocks that do not divide evenly simply use the pixels they cover — 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:pixelate imageimg px