How to use this tool
- Choose a PNG, JPEG or WebP image up to 10 MB and 24 megapixels.
- Set the longest grid edge, exported block size and palette. Run the tool and inspect the enlarged preview.
- Check the listed PNG dimensions, then download the image and optional JSON settings.
Check the built-in example
The fixture is a 4 × 4 image with red, green, blue and white quadrants. A longest grid edge of 2 gives a 2 × 2 sampled grid. With block size 8 and original sampled colors, the exported PNG is 16 × 16 pixels. It contains four visible RGB colors, and every quadrant becomes an 8 × 8 block. The preview can be larger than 16 pixels on screen; that display enlargement does not increase the saved image resolution.
Processing method
The grid fits within the requested longest edge without increasing the source grid resolution. Shorter edges are rounded to whole cells. Canvas draws the source into that grid with image smoothing disabled, then enlarges the grid by an integer block size, also without smoothing. The linked API describes that sharp scaling behavior. Optional palettes use the nearest squared RGB distance: 16 basic colors or four grays at 0, 85, 170 and 255. The algorithm does not use a perceptual color model or add dithering. Alpha values from the sampled grid are retained.
Reference: MDN: disabling canvas image smoothing
What the result leaves out
Supported files are PNG, JPEG and WebP up to 10 MB and 24 megapixels after decoding. The longest grid edge is 2–128 cells, and each output block is 1–16 pixels wide. Thus output dimensions cannot exceed 2048 × 2048. Integer cell rounding can change proportions slightly, especially for very thin images. Nearest sampling may miss fine features, and a limited palette can merge distinct source colors. This is deterministic pixelation rather than an AI illustration service, detail restoration or a hand-edited sprite. SVG, GIF animation and video are not supported. The output is a newly encoded PNG, not an editable layered project.
Checking local processing
Image decoding, grid sampling, palette matching and PNG creation happen on your device. The source is not posted to a conversion service. Browser libraries and the fictional demo are loaded from this website. Inspect Network while processing your own file to check that no image upload occurs. Reset releases the current result and download links. Files you already saved remain on your device.
Common questions
Why is the preview bigger than the saved PNG?
The page enlarges the preview for inspection. The dimensions table gives the actual PNG pixel size.
Will a finer grid restore lost detail?
No. It samples available source pixels; it does not invent detail missing from the input.
Does the palette preserve every original color?
Only the original-color mode keeps sampled RGB values. Limited palettes deliberately replace them with nearby palette entries.