Skip to content
🕹

Pixel Art Maker

Turn any image into pixel art by snapping it to a grid and reducing it to a fixed palette. Outputs a PNG and a matching CSS pixel-art look.

Runs in your browser

Updated

Drop an image, or click to choose one. Portraits and sprites convert best.

How it works

The image is snapped to a grid: every block of N×N pixels is averaged into a single colour, which is what gives the hard-edged look. Those colours are then reduced to the number you picked using median-cut quantisation, which splits the colour range where the image actually varies instead of using a fixed grid.

The result is displayed with image-rendering: pixelated so the preview stays sharp. Without that, browsers smooth the pixels and the whole effect disappears.

How an image becomes a grid

The drop box takes any browser-decodable image up to 15 MB, and Load a sample paints a 480 by 360 landscape. Grid size comes from the source: columns are natural width divided by the cell size, rows the natural height, each rounded and never below one. Cell size is chosen from 1, 2, 4, 6, 8, 12 or 16 with 4 set, colour count from 2 to 256 with 16 set. Downscaling draws the image onto that canvas, so a cell gets the average of its block; channels are then stretched around 128 and pulled toward their own luma when those sliders move off 0 and 100.

A worked example

The sample at 4px gives Grid 120 × 90 while Output prints 480×360. The second figure describes your source, not the file: the canvas is 120 by 90 pixels stretched to full width by CSS with pixelated rendering, so the saved pixel-art.png measures 120×90. Choose 16px and the grid drops to 30 × 23, because 360 over 16 rounds up from 22.5.

What the palette strip reports

Median cut splits the widest colour box along its longest axis at the pixel-count median until it holds the requested count, averages each box into one entry and maps each cell to the nearest by squared RGB distance. Swatches sort darkest first by perceived luminance and carry their hex as a tooltip. Fewer unique colours than requested means nothing is reduced, and the note says so.

Where it stops

  • Alpha is discarded, so every cell is written fully opaque and a transparent PNG becomes a solid block.
  • Each cell is the average of its block, which is why thin dark lines turn grey rather than staying sharp.
  • Copy pixel-art CSS emits a fixed rule with image-rendering and nearest-neighbor scaling; only the leading comment changes with the chosen cell size.
  • Mapping is without dithering, so gradients band into flat poster areas.
  • Grid size is uncapped on the source: 3000 by 2000 at 1px builds six million cells.

Questions people ask

Why does my logo turn muddy

Averaging plus median cut blend crisp edges into mid-tones, so a larger cell size and a low colour count read cleaner.

Which cell size fits a sprite

Divide the source width by the cells you want: 480 pixels at 4 gives 120, at 16 gives 30.

Can I reuse the colours

Hover a swatch for its hex, or extract them with the palette from image tool and normalise in the colour converter.