Pixel Art Generator

Quick start: pixel width controls how coarse the grid is, colour count controls how few colours are used. For obvious pixel art keep width at 32-96 and colours at 8-16; to stay close to the original, raise both. Your image is processed entirely in your own browser and never uploaded.

Drop an image here, or press Ctrl / ⌘ + V to paste from the clipboard

Pixel Art Generator Features

Median-cut adaptive palette

Splits the colour distribution into the most representative 2-32 colours rather than sampling evenly, so shadows and highlights each get their own entries.

Six retro palettes

Game Boy's four greens, PICO-8's sixteen, an NES eight-colour pick, pure black and white, and a five-step sepia — one click for instant period feel.

Two dithering modes

Floyd-Steinberg error diffusion for natural gradients, Bayer 4×4 for a regular halftone pattern, or switch dithering off entirely for clean flat blocks.

Tone control before quantization

Brightness, contrast and saturation are applied to the pixels first, so you shape the tonal range before colours get compressed — far more predictable than fixing it afterwards.

Stepwise halving downsample

Shrinking in one jump throws detail away, so the tool halves the image repeatedly before the final step, keeping edges and texture far more intact.

Nearest-neighbor upscale

Export disables interpolation and scales by whole numbers, so every cell becomes a clean square instead of a soft-edged blob.

How to Use the Pixel Art Generator

1

Bring an image in

Click Choose image, drag a file onto the preview, or screenshot and press Ctrl / ⌘ + V. Hit Sample first if you just want to feel out the controls.

2

Set the pixel width

Start around 32-64 until the grid becomes obvious, then fine-tune. Bigger width keeps more detail and loses the pixel feel; anything from 8 to 256 is fair game.

3

Pick a palette and dithering

Choose a preset for a specific era (the colour slider locks to its size), or stay on Adaptive for the closest match to the original. Photographs usually want diffusion; icons usually want dithering off.

4

Tune the tone, then export

Use brightness, contrast and saturation to land the overall balance, then choose an upscale factor and hit Export PNG. The factor only enlarges cells — it never affects sharpness.

Where to Use It

Game assets and prototypes

Convert reference art into 32×32 or 64×64 pixel versions for indie game characters, items and scene sketches.

Social avatars

Turn a selfie into a pixel avatar — Game Boy green or pure black and white stands out far more than a standard photo filter.

Retro posters and covers

Run a key visual through pixel treatment for album art, podcast covers or event posters to signal a retro-electronic mood instantly.

Journals and sticker prints

Export at 8x or 16x and print as stickers; the cells stay large enough that cut edges look clean.

Teaching colour quantization

Demonstrate why 16 colours can still represent a photograph, and how dithering fakes in-between tones, by changing parameters live.

Reducing information density

Turn a screenshot with sensitive details into a low-resolution pixel diagram that still conveys structure without exposing the original text.

Background Knowledge

What "resolution" means in pixel art

A pixel artwork's resolution is its logical cell count, not its file dimensions. A 64×48 piece can be saved at 512×384 (8x) or 1024×768 (16x), yet its resolution stays 64×48 because there are only 3072 independent cells. That is also why pixel art survives enlargement: upscaling just draws each cell as a larger square, introducing no new information and therefore no interpolation blur. What determines quality is cell count and colour count, never export size.

Why downsampling has to happen in steps

Taking a 2000px-wide image straight down to 64px is a 30x reduction. At that ratio browsers and most imaging libraries fall back to point sampling — a handful of source pixels stand in for an entire region — which drops detail at random and produces moiré and noise. The correct approach is stepwise halving: 2000 → 1000 → 500 → 250 → 125 → 64, where every step is close to 2x and the browser can perform a stable area average, blending detail evenly instead of discarding it randomly. This tool downsamples exactly that way, only jumping to the target size once the remaining ratio is under 2x.

How median cut picks colours

Median cut is one of the classic colour quantization algorithms. Treat every pixel as a point in 3D colour space and put them all in one box. Repeatedly take the box with the largest colour spread, split it at the median along its widest channel, and stop when you have as many boxes as target colours. The average colour of each box becomes one palette entry. What makes it smarter than sampling colours evenly is that it adapts: if a photo is mostly blue sky, the blue region gets split into several boxes while colours that barely appear never consume a slot. That is why it preserves shadow and highlight detail better than fixed-step quantization.

Dithering: faking colours you do not have

With only black and white, how do you show grey? Alternate black and white pixels at different densities; from a distance the eye averages them into grey. That is dithering. Floyd-Steinberg is error diffusion: when a pixel is quantized, the error (original minus quantized) is distributed to the right, bottom-left, bottom and bottom-right neighbours at 7/16, 3/16, 5/16 and 1/16, so later pixels compensate for earlier deviations. It looks natural but adds fine grain. Bayer 4×4 is ordered dithering: a fixed 4×4 threshold matrix offsets each pixel before quantization, producing a regular dot screen that suits gradients and compresses better, because regular patterns are more compressible than random noise.

Why upscaling must use nearest neighbor

Default image scaling uses bilinear or bicubic interpolation, which averages neighbouring pixels and turns hard edges into soft gradients. That is good for photographs and disastrous for pixel art, whose entire appeal comes from edges being hard. Nearest neighbor does no averaging at all: each source pixel is copied into an N×N block of destination pixels, so edges stay perfectly sharp. In CSS that is image-rendering: pixelated; on Canvas it is imageSmoothingEnabled = false. Both the preview and the export here force nearest neighbor, and only integer factors are allowed, avoiding the half-pixel misalignment that makes some cells one pixel wider than others.

Palette Reference

Palette Colors Origin / character Best for
Adaptive 2 - 32, adjustable Median cut generated from the image itself; closest to the original General use, especially photos and illustrations
Game Boy 4 The four-green monochrome screen of Nintendo's 1989 handheld Nostalgic avatars, retro game look
PICO-8 16 The fantasy console's official sixteen colors, highly saturated Game assets, characters and items
NES picks 8 A high-contrast eight-color selection from the NES palette Icons, UI elements, bold retro styling
Black & white 2 Pure black and pure white; dithering adds apparent greys Line art, stamp effects, minimal icons
Sepia 5 Five brown steps, evoking early photography and old monitors Vintage photos, aged posters

Note: choosing a fixed palette locks the Colors slider and shows that palette's size. Switch back to Adaptive to adjust the count by hand.

Frequently Asked Questions

Q: How is pixel art different from a mosaic blur?
A: A mosaic averages a region into one colour, usually to obscure it. Pixel art deliberately reconstructs an image at a limited resolution with a limited palette: every cell's colour is picked from an explicit colour table, so edges stay hard and blocks stay clean when enlarged. This tool does the latter — downsample to a small resolution, compress the colours to a target count, then upscale by an integer factor with nearest-neighbor sampling. You never get the mushy in-between tones a mosaic produces.
Q: What pixel width should I choose?
A: It depends on the use. Avatars and icons work at 32-48. Character art and scenes work at 64-96. Landscapes that need to keep detail work at 128-192. The larger the width, the more detail survives but the less it reads as pixel art. A useful rule: if the final image should be 512px wide, use 64px and upscale 8x — that looks far more like pixel art than quantizing at 512px directly. Game assets are usually 16, 32 or 64.
Q: Why does my result look blurry instead of pixelated?
A: Three usual causes. The target width is too large: at 256px the output is basically the original with noise, and you cannot see the cells. The colour count is too high: above 32 colours it approaches the original, so drop to 8-16 for visible blocks. Or the image gets rescaled elsewhere: if another program resizes the exported PNG, its default interpolation smears the hard edges into gradients. The file this tool exports is already upscaled to final size — do not resize it again.
Q: What is dithering for, and when should I turn it off?
A: Dithering fakes extra colours with a limited palette. With only black and white, alternating black and white dots at different densities reads as grey from a distance. Floyd-Steinberg is error diffusion: it looks natural but adds visible grain. Bayer is ordered dithering: it produces a regular dot pattern, which suits smooth gradients like skies. For clean flat blocks — icons, text, UI assets — turn dithering off. To preserve photographic tonal transitions, turn it on.
Q: Can I export with a transparent background?
A: Yes. If the source image already has an alpha channel (for example a cut-out PNG), the alpha values are preserved and transparent areas stay transparent in the exported PNG. Note that dithering only affects colour and never creates pixels in transparent regions. A JPEG has no transparency, so cut it out first and upload the result.
Q: Is my image uploaded anywhere?
A: No. The file is read into browser memory with FileReader, and downsampling, quantization, dithering and PNG encoding all happen locally. Nothing is sent over the network, and nothing is written to localStorage or IndexedDB. Closing or refreshing the page drops the image from memory.
Q: Can I batch-process several images?
A: One image at a time for now. Your settings persist, so processing a series is just upload-and-export repeatedly with the same parameters. If you need true batch processing, ImageMagick's -colors and -resize options work on exactly the same principle as this tool.