Pixelate Image
Choose an image
Pick a file above and the pixelated version appears here. Nothing is uploaded. The image is read and processed in this page.
Pixelation divides an image into square blocks and replaces each with the average colour of the pixels inside it. Useful as an effect, and worth reading the caveat before using it to hide anything. Pixelation is a much weaker redaction than it looks.
How it works
For each block, every pixel inside is summed and divided by the count, and the whole block is filled with that average. Averaging rather than sampling one pixel is what makes the result stable: a single-pixel sample makes the output jump between very different colours when the block size changes by one.
- Blocks at the right and bottom edges may be partial, and are averaged over however many pixels they actually contain.
- A block size of 12 on a 1200 × 800 image produces 100 × 67 blocks, the image now carries 6,700 distinct colours instead of 960,000 pixels.
- Alpha is averaged with the colour channels, so partially transparent regions stay partially transparent.
- The detail figure on the page is the ratio of blocks to original pixels, which is how much information survives.
On redaction: this produces a new image and the original pixels are not in the output, so it is not the classic "blur that can be undone" mistake. The real weakness is different, for short, predictable content such as a number plate or a six-digit code, an attacker can pixelate every candidate the same way and compare the results. Text has too few possibilities to hide behind an average. Cover sensitive content with a solid block.
Examples
A light mosaic
Block size
8px
Result
Recognisable shapes, unreadable fine detail
Enough to obscure texture and small text while keeping the composition legible.
Heavy pixelation
Block size
48px
Image
1200 × 800
Result
25 × 17 blocks, 0.04% of the original detail
At this size the image is a colour field. Almost nothing about the content survives.
Why not sample one pixel
Method
Averaging against sampling
Result
Averaging stays stable as the size changes
Sampling the top-left pixel of each block makes the output flicker between unrelated colours for a one-pixel change in block size.
Frequently asked questions
Is pixelation safe for hiding sensitive information?
Not for short, predictable content. An attacker can take every candidate (each possible number plate, each six-digit code) pixelate it with the same block size and compare. Text has too few possibilities for an average to hide it. Use a solid block over anything that must stay private.
Can the original be recovered from the pixelated image?
Not directly from this output. Each block is genuinely replaced by one colour and the pixels underneath are gone from the downloaded file. The danger is reconstruction by guessing, described above, not extraction. And note that some editors only overlay a pixelation effect while keeping the original data in the file, which is a separate and worse mistake.
What block size should I use?
For an effect, 8 to 16 pixels keeps the image recognisable. For obscuring a face, the block should be large enough that the face spans only a handful of blocks, typically 20 or more on a normal photograph. Judge it by the result rather than the number.
Why are the blocks averaged rather than sampled?
Stability. Taking one pixel per block means the output changes wildly for a one-pixel change in block size, because a different pixel gets chosen. The average of the block moves smoothly and represents what is actually there.
Does it work on transparent images?
Yes. Alpha is averaged along with the colour channels, so a partially transparent region stays partially transparent. A block spanning the edge of a transparent area comes out partially transparent, which is the sensible result.