Pixel Art Generator
Draw pixel-art sprites on a 8/16/24/32/48/64-cell grid. Tools: paintbrush, flood-fill, eraser. 20-colour default palette + colour picker. Drag to paint, undo history up to 30 steps. Export at native size or 8×/16×/32× upscaled (nearest-neighbour, no blur). Resizing the grid preserves your pixels. 100% offline.
What is the Pixel Art Generator?
Pixel Art Generator is a sprite editor that runs entirely in the browser. The grid supports six size presets (8×8, 16×16, 24×24, 32×32, 48×48, 64×64) — 16×16 is the classic 'icon' size, 32×32 a common sprite size, 64×64 generous for detailed avatars. Three tools: Paintbrush (click and drag to paint cells with the active colour, the pointer-down + pointer-enter pattern handles continuous strokes), Flood-fill (replaces all connected cells matching the clicked cell's colour — implemented with a 4-way stack-based flood algorithm that handles up to 4,096 cells without recursion limits), and Eraser (paints with the transparent value, leaving the checkerboard background showing through). The 20-colour palette covers the basic chromatic + grey ramp; the colour picker lets you set any arbitrary hex. Undo holds up to 30 history steps — every fill and every brush stroke is one undo step. Export: PNG at 1× (native sprite size, perfect for sprite sheets), 8×, 16× or 32× (nearest-neighbour upscaled so pixels stay crisp). Background colour for exports is configurable — pick the page background for transparent-by-default, or solid for sticker-style assets.
How to use it
- Pick a grid size — start with 16×16 for icons, 32×32 for character sprites.
- Pick a colour from the palette or open the colour picker for any hex.
- Click a cell to paint, drag to paint multiple cells.
- Switch to Flood-fill (PaintBucket icon) to fill connected regions; Eraser to clear cells back to transparent.
- Click Undo to reverse the last stroke or fill.
- When done, pick an export scale — 1× for sprite sheets, 16× or 32× for retina-sharp upscaled assets.
Benefits
- Six grid sizes (8 → 64) cover everything from favicons to detailed sprites.
- Three tools: paintbrush (drag), flood-fill (stack-based, handles large fills), eraser.
- 20-colour preset palette + arbitrary hex picker.
- Drag-to-paint with the pointer-down/pointer-enter pattern — works on mouse + touch + pen.
- Undo history (30 steps) covers every paint stroke and fill.
- Export at 1×, 8×, 16× or 32× — nearest-neighbour upscaling keeps pixels crisp.
- Configurable export background colour — transparent or solid.
- Resizing the grid preserves your existing pixels (within the new bounds).
- Grid, tool, colour and palette persist in localStorage.
- Runs 100% in your browser — no server, no upload.
Frequently asked questions
Why nearest-neighbour upscaling?
Bilinear or bicubic interpolation would blur the pixels at higher zoom levels — destroying the pixel-art aesthetic. Nearest-neighbour simply repeats each pixel at integer multiples, preserving the crisp edges that define the genre.
What size grid should I pick for an icon?
16×16 (classic favicon), 32×32 (modern app icon), or 48×48 (Windows taskbar). For modern web icons go 64×64 native + 8× export = 512 px, or directly export at 32×.
Can I import an existing image?
Not currently — the editor is canvas-from-scratch. For converting an existing image to pixel art, see specialised tools like dithering filters.
Does the flood-fill handle large connected regions?
Yes — implemented as a stack-based 4-way algorithm. Filling all 4,096 cells of a 64×64 grid completes in single-digit milliseconds.
Why is the eraser separate from a 'transparent' colour?
Empty cells use the empty string `''` internally so we can distinguish 'no pixel here' from 'pixel painted with the background colour'. This matters at export — empty cells become transparent in PNG, painted cells get the export background colour.
How big is the export PNG?
1× export of a 32×32 sprite is ~200 bytes (transparent), 8× ~3-5 KB, 32× ~10-20 KB. PNG compression makes pixel art tiny because of long colour runs.
Does undo cover the entire history?
Up to 30 steps — old history is dropped when you exceed the cap. Plenty for most sessions; if you need infinite undo, export periodically as a checkpoint.
Can I switch palettes mid-sprite?
Yes — palette choice is purely UI, the per-cell colour is whatever was active when you painted. Pick any hex; the saved palette is independent of which colours are actually on the canvas.
What about touch / iPad?
Pointer Events fire on touch identically to mouse, so dragging on a tablet works the same as click-and-drag on desktop. The cells are sized for thumb-friendly tap targets at default grid sizes.
Are my pixels saved between visits?
Yes — the full grid state, plus active tool / colour / background, persist in localStorage under `toollyz:pixel-art`.
Is anything uploaded?
No. Painting, undo and PNG export all run entirely in your browser.
Related tools
See all image toolsFavicon Generator from Text
Letter / emoji favicon with auto-fit, 9 PNG sizes and a hand-rolled .ico.
Lorem Ipsum Image Generator
Placeholder images at any size — solid, gradient, stripes, dots — PNG/JPG export.
Meme Generator
Upload an image, add top/bottom text, export as PNG.
Color Picker
9 color formats, WCAG contrast, harmonies and an eyedropper.