PNG Pixelate / Mosaic
Pixelate a PNG into chunky square blocks β classic mosaic / "8-bit" effect, and the right tool for high-stakes privacy redaction. Adjustable block size from 2 to 80 pixels.
What pixelating does
Pixelating an image divides it into a regular grid of squares and replaces every pixel inside each square with the average colour of that square. The result is a chunky, blocky version of the original β visibly made up of large squares of single colours. It's the look of early arcade graphics, Minecraft, and pretty much every "redacted face" you've seen on the news.
Mathematically, pixelating is a two-step process: shrink the image down to a tiny version (e.g. from 1920 wide to 80 wide for a 24-pixel block size), then scale that tiny version back up to the original dimensions using nearest-neighbour sampling so the edges stay crisp. The output canvas keeps the original dimensions but contains only as many distinct pixels as the shrunk middle version.
Why pixelation beats blur for privacy
Both blur and pixelation hide details, but only pixelation is genuinely hard to reverse. Standard Gaussian blur preserves more information than people realise β modern machine-learning techniques can recover surprisingly readable text and recognisable faces from heavily blurred images, especially when an attacker knows what they're looking for (a 16-character password, a numberplate, a specific person's face).
Pixelation at a sufficient block size destroys information rather than smearing it. Once the original colour values are averaged into a single square, the individual pixel-level variations are gone. There's no clever algorithm that can recover them. The trade-off is visible: pixelation is uglier than blur. But for redacting credit card numbers, passwords, ID documents, or any data with real consequences if revealed, pixelation is the right answer.
Rule of thumb: for serious privacy, the pixelation block size should be larger than the average size of a text character in the image. For a screenshot where text is ~12 px tall, use a block size of 16β24 px.
Creative uses for pixelation
- 8-bit / retro game aesthetic β channel the visual style of NES/Atari-era graphics. Combine with a limited colour palette for full retro effect.
- Mosaic art mock-ups β pixelating a portrait gives a quick preview of how it would look as actual tile mosaic.
- Censorship in television/media β pixelated faces and bodies in news/reality TV.
- Loading placeholders β heavily pixelated low-res versions of an image work as instant placeholders, similar to blurhash.
- Stylised social media posts β pixelated banners, retro-themed marketing.
- Glitch / vaporwave aesthetics β pixelation pairs naturally with other glitch effects.
Block size β what each range looks like
- 2β4 px β barely visible pixelation, more like aggressive resampling. Useful only as anti-aliasing for very sharp pixel art.
- 5β10 px β clearly chunky but original subject still recognisable. Soft mosaic feel.
- 11β18 px β strong pixelation, faces still vaguely identifiable, text scrambled to large unreadable shapes. Light-duty privacy redaction.
- 20β32 px β heavy pixelation, only the dominant colours and shapes remain. Serious privacy redaction starts here.
- 40β60 px β image becomes an abstract grid of large colour squares. Heavy stylisation.
- 60β80 px β only a few squares per image dimension. Pure abstraction.
How this tool works under the hood
Your PNG is drawn at a reduced size onto a temporary canvas. If the original is 1600 px wide and you've chosen a block size of 16 px, the temporary canvas is 100 px wide (1600 Γ· 16). That tiny image β where every pixel is now the averaged colour of one 16Γ16 block from the source β is then stretched back to 1600 px wide on a fresh canvas with imageSmoothingEnabled = false, so each "tiny pixel" becomes a perfectly sharp 16Γ16 square in the output. The result is exported as a fresh PNG.
The browser's built-in image scaling (used for the shrink step) averages multiple source pixels into each output pixel, which is exactly what we want β it's a fast, hardware-accelerated implementation of the mosaic average.
Tips and best practice
- For redacting credit card digits, passport numbers, license plates: use block size β₯ 20 px and prefer a solid black rectangle if absolute privacy matters.
- For redacting faces in social photos, block size 24β40 px is the journalistic norm.
- If your image is small to begin with (e.g. 400 px wide), drop the block size proportionally β 8 px on a 400 px image gives the same visual effect as 32 px on a 1600 px image.
- Don't combine pixelate with a blur β they cancel out the visual rhythm and produce a soft-but-blocky mess. Pick one.
- For "8-bit game" looks, follow up with Saturation bump to 130β150% to mimic the punchy colours of retro game palettes.
FAQs
Is pixelation safer than blur for hiding text?
Generally yes, especially at larger block sizes. Standard Gaussian blur can sometimes be partially reversed with deconvolution; pixelation discards information completely.
Will transparency be preserved?
Yes β the alpha channel is averaged along with the colours, so transparent areas stay transparent.
Why does my pixelated image have the same dimensions as the original?
Because the tool first shrinks then scales back up. The pixel count is the same; the number of distinct colour values is much lower.
Can I pixelate just one region of the image?
Not in this tool. You'd need a graphics editor with selection support, or crop, pixelate, and composite manually.
Is anything uploaded?
No. Everything runs in your browser.
What's the smallest useful block size?
2 px is the minimum β anything smaller is invisible at normal viewing.