Skip to content

Image to pixel art and sprite grid maker

Downsample images onto exact sprite grids, quantize colors to classic retro console palettes with optional dithering, and export crisp PNG or SVG sprites.

Your files are open only in this tab. Nothing is uploaded.

Source image

Quantizes onto classic console palettes or adaptive colors and exports crisp PNG or SVG.

Drop a photo, illustration, or sprite

Processed offline in an image Web Worker.

How to use Pixel art converter

  1. Load an image or sample sprite. Drop any PNG, JPG, or WebP picture into Choose image, or test the converter with the built-in 160x160 sample mountain sprite.
  2. Set grid dimensions and choose a palette. Drag Grid width between 8 px and 128 px, then select PICO-8, Game Boy DMG, NES Classic, or an Auto Adaptive 8, 16, or 32 color set.
  3. Pick dithering and optional grid overlays. Choose Bayer 4x4 ordered, Floyd-Steinberg error, or flat nearest color matching, adjust Export scale up to 16x, and toggle Show pixel grid for a 1 px overlay.
  4. Download PNG or vector SVG sprites. Inspect active palette swatches in the preview, then save crisp nearest-neighbor PNG artwork or resolution-independent SVG sprite geometry.

Your files are processed on this device and never uploaded. They stay private, and there's nothing to delete afterwards.

How does box downsampling keep sprites sharp?

Alpha-weighted box downsampling averages every source pixel inside each sprite cell while weighting RGB color channels by opacity. Decoding runs locally via the MDN CanvasRenderingContext2D.getImageData() specification capped at 640 px so transparent edges stay crisp instead of smudging gray fringes into sprite borders.

Unlike simple resize blurs, this browser pixel art converter turns any image to pixel art onto crisp rectangular grids from 8 px to 128 px wide before any palette quantization runs. Proportional heights stay clamped inside that same range, letting game artists iterate on 16 px icons or 64 px tiles cleanly with zero server uploads.

Note: Each averaged cell uses a binary alpha cutoff at 96 out of 255. Transparent cutouts drop cleanly to zero alpha while solid body pixels snap to full 255 opacity.

After previewing retro console palettes in the swatch bar, designers often catalog hex values for style sheets. Grabbing exact RGB hex codes from existing artwork is straightforward with the image color palette swatch extractor before writing shader constants.

Choosing retro console palettes and dithering options

Color quantization maps thousands of photographic RGB values onto strict hardware counts without washing out focal silhouettes. Notice that Bayer 4x4 ordered dithering defaults to an active spread tuned to each palette size so textures avoid muddy speckling.

Incoming artwork downloaded from social feeds sometimes arrives wrapped with mismatched JPEG file extensions. If an upload validator rejects a browser-saved photo beforehand, convert .jfif artwork to standard .jpg first so browsers decode the raster channels cleanly.

Fixed retro presets versus median-cut adaptive palettes

Fixed retro presets lock RGB candidates to historical display hardware such as 4-color Game Boy DMG screens or 28-color NES Classic chips. Selecting an Auto Adaptive option (8 colors, 16 colors, or 32 colors) triggers recursive median-cut quantization across opaque sprite cells with alpha at least 64.

Median-cut sorting identifies whichever RGB channel spans the widest numeric spread and splits buckets iteratively by pixel count until the requested color count is reached. Each resulting bucket averages into one representative swatch shown live under Active palette swatches.

Bayer 4x4 ordered grid versus Floyd-Steinberg error

Each dithering algorithm trades spatial regularity against tonal gradient accuracy before snapping colors onto the nearest palette candidate. Adjusting this pass changes how banded shading breaks up across limited retro swatches.

  • Bayer 4x4 ordered: Applies a 4x4 threshold matrix scaled to spread 56 for 4-color palettes or 36 for larger sets, yielding rhythmic retro crosshatching.
  • Floyd-Steinberg error: Propagates rounding error rightward (7/16) and downward (3/16, 5/16, 1/16) across opaque cells for natural photographic shading.
  • None (flat nearest): Disables dithering altogether and snaps each box-averaged cell to its single closest swatch for clean cartoon cel silhouettes.

Green-weighted perceptual color matching math

Nearest-color lookup uses perceptual Euclidean channel weights derived from the ITU-R BT.601 studio color weighting recommendation rather than flat unweighted RGB distance. Specifically, the worker minimizes squared error weighted by 2 on red, 4 on green, and 1.5 on blue.

Weighting green twice as heavily as red keeps grassy landscapes, skin tones, and olive Game Boy shadows closer to human brightness perception. Combined with the 640 px source cap, worker quantization completes cleanly inside local browser threads in milliseconds.

Preset console palettes and dithering behavior

Nine built-in color palettes cover both strict 8-bit hardware constraints and adaptive portrait reduction. Exporting finished raster sprites relies on the W3C PNG Third Edition specification so sharp 1-pixel boundaries never suffer JPEG compression ringing.

Palette preset Color count Palette source Recommended dithering Best sprite application
PICO-8 16 colors Fantasy console fixed RGB Bayer 4x4 ordered Indie character tiles and dungeon UI
Game Boy DMG 4 colors Olive monochrome LCD steps Bayer 4x4 ordered Handheld nostalgia covers and portraits
Sweetie 16 16 colors Balanced low-saturation artist set None or Bayer 4x4 Cozy RPG terrain and item icons
NES Classic 28 colors Warm 8-bit hardware tones None (flat nearest) Bold platformer sprites and badges
IBM CGA Mode 4 4 colors Cyan, magenta, black, white Bayer 4x4 ordered High-contrast 1980s DOS overlays
4-Shade Ink 4 colors Pure ink grayscale ramp Floyd-Steinberg or Bayer E-ink stickers and laser test graphics
Auto Adaptive 8, 16, 32 8 to 32 colors Recursive median-cut from image Floyd-Steinberg error Scenery thumbnails and portrait studies

Multi-frame walk cycles and weapon icons often start as standalone exports from repeated grid settings. Once individual poses are quantized consistently, developers can combine finished sprite frames into a horizontal sheet for game engine animation atlases.

Exporting pixel art PNG sprites and SVG grids

Once the sprite grid looks crisp, Export scale multiplies logical pixel dimensions by 1x to 16x using pure nearest-neighbor duplication. Both raster PNG sheets and lightweight SVG sprites emit straight from memory using exact palette colors with zero network calls.

Nearest-neighbor PNG scaling and 1 px grid overlays

Integer scaling clones each quantized sprite cell into exact square pixel blocks (8x default turns a 32 px sprite into 256 px PNG output) without bilinear interpolation. Enabling Show pixel grid draws subtle 1 px right and bottom borders darkened to 0.72 RGB brightness whenever Export scale reaches 3x or higher.

  • Clean blueprint sheets: Keeping the 1 px grid overlay visible makes cross-stitch, bead art, and voxel grid counting straightforward during physical crafting.
  • Game engine textures: Unchecking Show pixel grid keeps exported PNG sprites tileable for game levels and texture samplers.
  • Exact alpha preservation: PNG encoding skips transparent grid lines outside solid sprite bounds, keeping background pixels invisible.

Run-length SVG geometry with crispEdges rendering

Vector sprite export creates a minimal <svg> wrapper marked with shape-rendering="crispEdges" per the W3C SVG 2 shape-rendering specification. Instead of emitting one <rect> element per grid square, a horizontal run-length merger merges contiguous cells sharing identical RGB colors into single wide strips and omits fully transparent cells.

Merging horizontal runs shrinks SVG DOM node counts dramatically while keeping edges crisp at any viewport zoom level. For photographic curves or logos that require smooth Bezier contours instead of blocky sprite cells, switch to vector tracing from PNG sprites without blurry paths.

Questions

When should you use Bayer 4x4 ordered dithering instead of Floyd-Steinberg error diffusion?

Use Bayer 4x4 ordered dithering when converting sprites to tight 4-color or 16-color palettes because deterministic crosshatch patterns look authentic in retro games. Switch to Floyd-Steinberg error diffusion on 16-color or 32-color adaptive palettes when preserving smooth photo gradients matters more than clean repeating pixel texture.

Why export pixel art as an SVG with shape-rendering crispEdges?

Standard SVG browsers blur sharp pixel boundaries when zooming raster shapes. Setting crispEdges disables edge anti-aliasing while horizontal run-length merging collapses adjacent identically colored squares into single rectangle nodes, keeping vector sprites lightweight and razor-sharp at billboard or favicon scale.

How does the pixel art converter handle transparent PNG sprite backgrounds?

After alpha-weighted box averaging merges source pixels into each sprite cell, the worker applies a strict binary alpha threshold at 96 out of 255. Cells below 96 become completely transparent while cells at or above 96 turn opaque, preventing muddy edge fringes around game character cutouts.

What is the difference between PICO-8, Game Boy DMG, and Auto Adaptive color palettes?

PICO-8 (16 colors), Game Boy DMG (4 olive greens), Sweetie 16, NES Classic (28 colors), and IBM CGA Mode 4 enforce fixed retro console constraints. Auto Adaptive 8, 16, and 32 modes use recursive median-cut quantization to extract balanced custom colors straight from your uploaded image.

Why does Show pixel grid only draw lines at 3x export scale or higher?

At 1x or 2x integer scaling, a 1 px border grid covers half or all of every sprite cell and hides the artwork. Starting at 3x scale or higher, the renderer leaves clean unshaded interiors while darkening bottom and right pixel edges by 0.72 brightness.

Updated