How to make a sprite sheet

A sprite sheet packs every frame of a character's animations into one image that a game slices up by grid. Here's how to plan the grid, keep frames aligned so nothing jitters, export it, and import it into Unity, Godot, GameMaker, Phaser or a web page.

Updated November 2026 · 7 min read

The short version. Make every frame the same size, big enough for the largest pose. Put one animation per row. Keep the character anchored to the same point in every cell. Export a transparent PNG at 1×, then slice it in your engine by cell size with nearest-neighbour filtering.

What a sprite sheet is, and why games use them

A sprite sheet is a single image that holds many frames — every pose of a walk cycle, or a whole set of items — laid out on a grid. The game loads that one texture and draws a rectangle out of it for each frame. Compared with dozens of separate files, that means fewer loads, fewer texture switches for the GPU (so sprites can be drawn in batches) and animations that stay organised.

There are two kinds:

1. Pick a frame size that fits the largest pose

Every frame in a grid sheet must be the same size. Size the cell for the widest and tallest pose of any animation the sheet will hold — an attack swing or a jump, not the idle pose — and leave a pixel or two of margin so nothing touches the cell edge.

Cells don't have to be square (48×32 is fine for a wide creature), and modern engines no longer require power-of-two textures. If you're on an older or mobile pipeline that does, pad the whole sheet up to the next power of two rather than changing the cell size.

2. Lay it out: one animation per row

The convention most engines and artists expect is one row per animation, with its frames running left to right. Here's the mascot's eight-frame wave as a one-row sheet:

A sprite sheet holding the mascot's eight-frame wave in one row of 32 by 32 cells.
32×32 cells · one row: wave, 8 frames
Dashed lines mark the cells and the red line the baseline his feet stand on. A character with more animations — idle, walk, jump — gets a row for each, and a shorter row leaves its last cells empty.

Keep a short note next to the file — or in its name — with what each row is, how many frames it has and how fast it plays, for example wave: row 0, 8 frames, 7 fps · walk: row 1, 6 frames, 10 fps. Characters that face several directions usually get a row per direction; side-view characters often store only one and flip it in the engine.

3. Keep a fixed anchor point

Engines place a sprite by its pivot — usually the bottom centre, between the feet. If the character drifts around inside its cell from frame to frame, it will visibly jitter in the game even though every frame looks fine on its own.

Four wave frames that sit at different heights and positions in their cells, missing the pivot marks.
No fixed anchor — the wave will hop and slide
The same four frames standing on the baseline, centred on the pivot marks.
Feet on the baseline, body over the pivot
The red squares mark each cell's pivot. Only movement you drew on purpose — here, the waving arm and the scarf ends — should change between frames.

The easiest way to get this right is to draw every frame on the same canvas with onion skinning on, so you can see the previous pose underneath. Don't crop frames individually when you export a grid sheet.

4. Spacing, padding and texture bleeding

When a game draws a sprite at a fractional position or scale, or with smooth texture filtering, the GPU can sample pixels from just outside the frame's rectangle. On a tight grid those pixels belong to the neighbouring frame, and they show up as thin lines along the sprite's edges. You can prevent it in a few ways:

If none of those apply to you, a tight grid with no spacing is the simplest thing to work with.

5. Export

The PixeMaker export dialog with Sheet selected, laid out in one row at 1x scale, producing a 256 by 32 PNG.
In PixeMaker, Export → Sheet writes every frame into one PNG, as a single row or a grid, at the scale you choose.

6. Import it into your engine

Unity

  1. Select the PNG and, in the Inspector, set Texture Type to Sprite (2D and UI), Sprite Mode to Multiple, Pixels Per Unit to your tile or frame size (for example 32), Filter Mode to Point (no filter) and Compression to None. Click Apply.
  2. Open the Sprite Editor, choose Slice → Grid By Cell Size, enter the cell size (plus any offset or padding you left), set the pivot to Bottom, then Slice and Apply.
  3. Select one row's frames in the Project window and drag them into the scene. Unity creates an animation clip; set its sample rate in the Animation window.
  4. For movement without shimmer, add a Pixel Perfect Camera (built into URP).

Godot 4

  1. In Project Settings → Rendering → Textures, set Default Texture Filter to Nearest.
  2. Add an AnimatedSprite2D, give it a new SpriteFrames resource and open the SpriteFrames panel.
  3. Click Add frames from sprite sheet, pick the PNG, enter the number of horizontal and vertical cells, select the frames for one animation and add them. Set the animation's FPS and loop toggle in the same panel.

Alternatively, use a Sprite2D with Hframes and Vframes set to your grid and animate its Frame property with an AnimationPlayer.

GameMaker

  1. Create a sprite, open its image editor and choose Image → Import Strip Image. Enter the number of frames, frames per row, frame width and height, and any offsets or separation.
  2. Set the sprite's origin to Bottom Centre and its playback speed in frames per second.
  3. In Game Options → (your platform) → Graphics, untick Interpolate colours between pixels so the art stays sharp.

Phaser 3

// In the game config: pixelArt: true  (nearest-neighbour + whole-pixel rendering)
// preload()
this.load.spritesheet('hero', 'hero_wave_32x32.png', { frameWidth: 32, frameHeight: 32 });

// create()
this.anims.create({
  key: 'wave',
  frames: this.anims.generateFrameNumbers('hero', { start: 0, end: 7 }),
  frameRate: 8,
  repeat: -1
});
this.add.sprite(160, 120, 'hero').setScale(4).play('wave');

Plain CSS

A one-row sheet animates on a web page with no JavaScript — steps() jumps the background one frame at a time:

.hero {
  width: 32px;
  height: 32px;
  background: url(hero_wave_32x32.png) 0 0;
  image-rendering: pixelated;
  transform: scale(4);
  transform-origin: top left;
  animation: wave 1.2s steps(8) infinite;
}
@keyframes wave {
  to { background-position: -256px 0; } /* 8 frames × 32px */
}

Mistakes that break sprite sheets

Frequently asked questions

What is a sprite sheet?

A single image that holds many animation frames or sprites on a grid. The game loads it once and draws one rectangle from it per frame, which is faster and tidier than loading many separate images.

What size should each sprite sheet frame be?

All frames must be the same size, big enough for the largest pose in any animation plus a pixel or two of margin. 16×16, 32×32 and 64×64 are common, but cells don't have to be square.

Should sprite sheets be a power of two?

Modern engines don't require it. Some older or mobile pipelines still prefer power-of-two textures; in that case pad the whole sheet rather than changing the frame size.

Why do I see lines at the edges of my sprites in game?

That's texture bleeding: the GPU samples pixels from the neighbouring frame. Use nearest-neighbour filtering, keep sprites at whole-pixel positions, or leave 1–2 pixels of spacing between frames and tell the slicer about it.

How do I import a sprite sheet into Unity or Godot?

In Unity, set the texture to Sprite Mode Multiple and Filter Mode Point, then slice it in the Sprite Editor with Grid By Cell Size. In Godot 4, set the default texture filter to Nearest and use Add frames from sprite sheet in an AnimatedSprite2D's SpriteFrames panel.

Try it in the editorFree, in your browser, nothing to install.

Open the editor