Image to 8-Bit Converter - Pixelate & Retro Color Quantize Online
Convert any image to 8-bit pixel art style. Adjustable palette size, pixel scale, and dithering (Floyd-Steinberg, Bayer). Free, client-side, no upload.
About
Converting an image to an 8-bit aesthetic requires two distinct operations: spatial resolution reduction (pixelation) and color depth reduction (quantization). Getting either wrong produces mud. Naive downscaling with bilinear interpolation blurs edges and destroys the hard-pixel look that defines retro art. This tool uses area-average downsampling followed by nearest-neighbor upscaling to preserve crisp pixel boundaries. Color reduction uses the Median Cut algorithm, which recursively partitions the RGB color cube along its longest axis to find k representative colors where k ranges from 2 to 64. Without dithering, banding artifacts appear in gradients. The tool offers Floyd-Steinberg error diffusion and Bayer ordered dithering (4×4 and 8×8 matrices) to mitigate this. All processing runs locally in a Web Worker. No pixels leave your device.
Limitations: the Median Cut palette is computed per-image, not matched to a fixed hardware palette (NES, Game Boy). Extremely dark or monochromatic source images may produce fewer distinct palette entries than requested. Transparent PNG alpha channels are composited onto a white background before processing. Dithering on images smaller than 64×64 pixels may produce noise rather than useful detail.
Formulas
Median Cut Partitioning
Given a bucket B of pixels, compute the range along each channel:
Rrange = max(r) − min(r), same for Grange, Brange
Split along the axis with the greatest range at the median value. Repeat until k buckets exist. The representative color of each bucket is the component-wise mean.
Floyd-Steinberg Error Diffusion
For each pixel, quantization error e = old − new is distributed:
pixel(x+1, y) += e × 716
pixel(x−1, y+1) += e × 316
pixel(x, y+1) += e × 516
pixel(x+1, y+1) += e × 116
Bayer Ordered Dithering
A threshold matrix M of size n × n is applied. For a 4×4 Bayer matrix, threshold t at position (x, y):
t = M[x mod n][y mod n]n2 − 0.5
The pixel value is biased by t × spread before nearest-color lookup.
Euclidean Color Distance
d = √(r1 − r2)2 + (g1 − g2)2 + (b1 − b2)2
Where r, g, b are the red, green, and blue channel values (0 - 255).
Reference Data
| Platform / Era | Resolution | Colors On-Screen | Palette Total | Pixel Aspect | Year |
|---|---|---|---|---|---|
| Game Boy | 160 × 144 | 4 | 4 (shades of green) | 1:1 | 1989 |
| NES (NTSC) | 256 × 240 | 25 | 54 | 8:7 | 1983 |
| Sega Master System | 256 × 192 | 32 | 64 | 1:1 | 1985 |
| Commodore 64 | 320 × 200 | 16 | 16 | 1:0.9375 | 1982 |
| ZX Spectrum | 256 × 192 | 15 | 15 | 1:1 | 1982 |
| Sega Genesis | 320 × 224 | 61 | 512 | 1:1 | 1988 |
| SNES | 256 × 224 | 256 | 32768 | 8:7 | 1990 |
| Game Boy Color | 160 × 144 | 56 | 32768 | 1:1 | 1998 |
| Atari 2600 | 160 × 192 | 128 | 128 | 1:1 | 1977 |
| MSX | 256 × 192 | 16 | 16 | 1:1 | 1983 |
| Amiga OCS | 320 × 256 | 32 | 4096 | 1:1 | 1985 |
| Apple II | 280 × 192 | 6 | 16 | 1:1 | 1977 |
| TurboGrafx-16 | 256 × 240 | 482 | 512 | 8:7 | 1987 |
| Neo Geo | 320 × 224 | 4096 | 65536 | 1:1 | 1990 |
| GBA | 240 × 160 | 512 | 32768 | 1:1 | 2001 |