Guide
How to make a sprite sheet
Frame size, grid layout, padding and slicing — the decisions that separate a clean animation from a stitching mess.
A sprite sheet is one image that holds every frame of an animation on a grid. Engines read it as a single texture and pick cells out by rectangle, which is faster and simpler than loading forty files. This guide covers the decisions that go into building one: frame size, grid layout, padding, transparency and how to slice the result once your engine has it.
If you just want to make one now, the sprite sheet maker does all of this in a browser tab in about a minute.
Step 1: decide the frame size
The frame size is the cell each drawing will sit in. It is not the size of the character — it is the size of the canvas that character was drawn on, including the empty space needed for a swing, a jump or a hat.
Measure your largest frame. If a character's arm reaches 56 pixels when attacking, a 56-pixel cell is too tight and a 64-pixel cell is right. Round up to a power of two only if your engine or target platform asks for it; many modern engines accept any size.
Common choices:
| Frame size | Fits |
|---|---|
| 16×16 | Tiles, tiny characters, game jam prototypes |
| 32×32 | 16-bit style characters, classic platformer cast |
| 48×48 | Mixed tile and character sets |
| 64×64 | Most indie character sets with room for motion |
| 128×128 | Hand-painted characters, softer art styles |
One rule beats all of them: every frame on a sheet must have the same width and height. A sheet with one 40-pixel frame among 44-pixel frames cannot be sliced on a grid, and the resulting animation wobbles.
Step 2: draw every frame on the same canvas
Export each frame from your art tool at the full frame size, even when the character only fills a corner of it. A consistent canvas is what keeps a character's feet planted while the body moves — the position inside the cell is the animation.
Most art tools can help here. Aseprite exports a sprite sheet directly from the File menu with the frames laid out in rows. Krita and Photoshop need each frame exported at canvas size rather than cropped to its content.
Step 3: choose the layout
Two decisions: how many columns, and how much padding.
Columns. A near-square grid is the easiest to reason about: 16 frames become 4×4, 26 frames become 6×5 with four empty cells at the end. A single long row is simpler to index but hits texture width limits sooner. Frame index is always read left to right, top to bottom, so the count matters more than the shape.
Padding. Padding adds empty pixels between cells. Leave it at zero unless you see thin lines at the edges of frames on mobile hardware. When you do need it, one or two pixels is enough. Padding multiplies: 8 columns of 64×64 with 2 px padding adds 18 pixels to the width and 18 to the height.
Step 4: keep transparency real
Export PNG, not JPG. JPG has no alpha channel, so transparent areas become solid colour and every frame arrives with a rectangle around it. A PNG with the same frame count is usually smaller too, because large transparent areas compress well.
Do not flatten frames onto a white or magenta background and plan to key the colour out later. Anti-aliased edges leave a fringe of the old colour, and the fix is always to re-export properly.
Step 5: build the sheet
Drop your frames into the sprite sheet maker, set the frame size to match your art, leave columns at 0 for an automatic near-square grid, and build. The preview sits on a checkerboard so transparency is visible immediately, and the frame JSON downloads alongside the PNG.
What to check before you leave the page:
- The sheet width and height are whole multiples of the frame size, plus any padding.
- The frame count in the status line matches the number of images you dropped in.
- No frame looks clipped at the bottom or right edge.
- The checkerboard shows through where the background should be transparent.
Step 6: slice it in your engine
The numbers you set when building the sheet are the numbers you type into the engine. Godot, Unity, Phaser and GameMaker all slice by cell size, and a one-pixel mismatch drifts across the sheet until the animation looks broken.
- Godot 4: import the PNG, select the Sprite2D, and either set regions with AtlasTexture or drop the sheet into AnimatedSprite2D and slice by grid in the SpriteFrames editor.
- Unity: set Sprite Mode to Multiple, open the Sprite Editor, choose Slice, Grid By Cell Size, and enter the frame width and height.
- Phaser:
this.load.spritesheet('hero', 'hero.png', { frameWidth: 64, frameHeight: 64 }). - GameMaker: set the sheet as the sprite image and let the sprite editor split it by frame size.
If the first frame looks right and later frames drift, the frame width is wrong. If every frame is offset by the same few pixels, the padding or the sheet margin is missing from your settings.
Step 7: check the animation, not just the frames
Build the sheet, then play it. A static sheet can look perfect and still stutter, because the mistake is in the pacing or in one frame drawn a pixel higher than its neighbours. The sprite sheet animator loops a sheet at a chosen frame rate with a frame counter, which is enough to catch almost every mistake before it reaches the engine.
Common mistakes
- Mixed frame sizes. The grid cannot hold them. Fix the canvas in the art tool and re-export.
- Trimmed frames. Exporting each frame cropped to its content destroys the character's position. Turn off trimming, or the equivalent option in your art tool.
- JPG export. No transparency, fringed edges.
- Oversized sheet. Over 8192 pixels on a side, many GPUs refuse the texture. Split the animation into two sheets.
- Frame size guessed at slicing time. Type the same numbers the sheet was built with, not round numbers that look about right.
Going the other way
If you inherited a sheet and need the frames back, the sprite sheet splitter cuts one into individual PNGs on the grid you specify and packs them into a ZIP.
Frequently asked questions
What size should a sprite sheet be?
The sheet size is a result, not a target: columns multiplied by frame width, rows multiplied by frame height, plus any padding. Keep each side under 8192 pixels and under 2048 if you target older phones.
Should a sprite sheet be a power of two?
Only if your target platform requires it. Modern desktop and mobile engines accept arbitrary sizes. Power-of-two mattered for old GPUs and some compression formats.
Do I need padding between frames?
Usually not. Add one or two pixels if you see thin lines bleeding from neighbouring frames on mobile. Padding costs texture space and complicates the slicing maths.
Can I put several animations on one sheet?
Yes, and most games do: idle on row one, walk on row two, attack on row three. Slice by cell size and tell the engine which row belongs to which animation.
PNG or WebP for sprite sheets?
PNG is the safe default — every engine reads it and it keeps the alpha channel. WebP is smaller but a few engines and older tools still cannot import it.