Lesson 6 · Animation

Exporting a Sprite Sheet

Export a pixel art animation as a sprite sheet PNG with a JSON frame list: choose layout, padding and scale, then load it in Godot, Unity, Phaser or GameMaker.

By Updated 15 min read

A sprite sheet with four slime frames in one row

Steps at a glance

  1. Open an animated project. Open a project with two or more frames, such as the bouncing slime from lesson 5.
  2. Switch to Sprite sheet. Choose Sprite sheet at the top of the studio. The project's frames are listed in order.
  3. Set the layout. Choose frames per row, padding, scale and background.
  4. Check the preview. Check that frames are in order and evenly spaced.
  5. Download PNG and JSON. Download the PNG and JSON, then load them in your game engine with nearest-neighbor filtering.
On this page
  1. Sprite sheet vs GIF
  2. Step 1: Open an animated project
  3. Step 2: Switch to Sprite sheet
  4. Step 3: Choose the layout
  5. Step 4: Check the preview
  6. Step 5: Download the PNG and JSON
  7. Step 6: Load it in a game engine
  8. Common sprite sheet mistakes
  9. Organizing sheets with several animations
  10. Checking the export
  11. Keep your project file
  12. What you practised

A sprite sheet packs every frame of an animation into one image, laid out on a grid. Game engines load the sheet once and show one rectangle at a time, which is faster and simpler than loading many separate files. In this lesson you will turn the four-frame slime from the previous lesson into a sprite sheet PNG and a JSON file that describes each frame.

Sprite sheet vs GIF

Both hold an animation, but they serve different purposes:

Animated GIFSprite sheet + JSON
Plays by itselfYes, in browsers and chatsNo, a program draws the frames
TransparencyOn or off onlyFull alpha
Colors256 per frameUnlimited
Best forSharing, social posts, previewsGames, web animations, apps

If you are making a game, use a sprite sheet.

Step 1: Open an animated project

Open the starter: it is the finished slime with four frames and durations of 180, 120, 120 and 180 milliseconds. Any project with two or more frames will work the same way.

The four-frame bouncing slime animation
The animation we will export. Open it in the editor.

Step 2: Switch to Sprite sheet

At the top of the studio, choose Sprite sheet (or open the sprite sheet maker page). The Frames list on the left shows each frame with its name, size and source. The switch Use the 4 frames of ”…” includes the project’s frames.

Editor frames are named frame_01, frame_02 and so on. You can:

  • Reorder frames with the up and down arrows.
  • Remove a frame from the sheet with ×. This only affects the sheet, not your project.
  • Add PNG images from other tools. They are added after the editor frames and keep their file names.

Step 3: Choose the layout

In Layout:

  • Frames per row. For one short animation, put all frames in one row (here, 4). For many animations in one sheet, a common choice is one row per animation.
  • Padding. Space between frames, in pixels. Use 0 for simple pixel-perfect engines; 1–2 px if your engine filters or mipmaps textures.
  • Scale. 1× is standard. 2× and 4× are for tools that cannot scale pixel art sharply.
  • Different frame sizes. Same cell size puts every frame in a cell as big as the largest frame, centered and bottom-aligned, never stretched. Keep each size packs frames at their own sizes, and the JSON records each rectangle.
  • Background. Keep Transparent for games. Solid color is useful for previews and printing.

Step 4: Check the preview

The Preview shows the sheet exactly as it will be saved, enlarged so you can inspect it. Check:

  1. Frames are in the right order, left to right, top to bottom.
  2. No frame is cut off at an edge.
  3. The ground line of the slime is on the same row in every cell.
The slime sprite sheet: four 16×16 frames in a single row
The result, shown at 8×. The real file is 64×16 pixels.

Step 5: Download the PNG and JSON

Choose Download PNG + JSON. You get two files named after your project, for example bouncy-slime-sheet.png and bouncy-slime-sheet.json. PNG only and JSON only download one of them.

The JSON is plain and engine-neutral:

{
  "meta": {
    "app": "Pixel Art Drawing (pixelartdrawing.com)",
    "version": 1,
    "image": "bouncy-slime-sheet.png",
    "size": { "w": 64, "h": 16 },
    "frameCount": 4,
    "units": "pixels; duration in milliseconds"
  },
  "frames": [
    { "name": "frame_01", "x": 0,  "y": 0, "w": 16, "h": 16, "duration": 180 },
    { "name": "frame_02", "x": 16, "y": 0, "w": 16, "h": 16, "duration": 120 },
    { "name": "frame_03", "x": 32, "y": 0, "w": 16, "h": 16, "duration": 120 },
    { "name": "frame_04", "x": 48, "y": 0, "w": 16, "h": 16, "duration": 180 }
  ]
}

Each frame lists its rectangle in the sheet (x, y, w, h) and how long it shows, in milliseconds. You can download our example sheet and JSON to test your engine setup. In those files the frames were renamed to slime_01 to slime_04.

Step 6: Load it in a game engine

The general steps are the same everywhere: import the PNG with nearest-neighbor filtering (no smoothing), tell the engine the frame size, and set the frame timing.

  • Godot. Import the PNG and set the texture filter to Nearest. In an AnimatedSprite2D, create SpriteFrames and use Add frames from sprite sheet with 4 horizontal and 1 vertical. Set the speed in frames per second, or per-frame durations.
  • Unity. Set the texture’s Filter Mode to Point (no filter) and Compression to None. Set Sprite Mode to Multiple and slice by Grid by cell size (16×16). Drag the slices into the scene to create an animation clip.
  • Phaser. Load it with this.load.spritesheet('slime', 'bouncy-slime-sheet.png', { frameWidth: 16, frameHeight: 16 }) and enable pixelArt: true in the game config.
  • GameMaker. Create a sprite and use Import Strip Image with 4 frames of 16×16.

The JSON is useful when frames have different sizes (with Keep each size) or when you want to read per-frame durations in your own code. Most engines expect a constant frame rate, so set it close to your average duration (about 150 ms here, or roughly 7 frames per second), or apply the per-frame durations yourself.

Common sprite sheet mistakes

  • Blurry sprites in the game. The engine is using linear filtering. Switch it to nearest or point filtering.
  • Lines from neighboring frames at the edges. Add 1–2 px of padding, or disable mipmaps.
  • Frames that jitter. The character’s position changes between frames. Keep a fixed ground line and a consistent center.
  • Exporting at a large scale and scaling again in the engine. You double the memory and may get uneven pixels. Export at 1× and let the engine scale by whole numbers.

Organizing sheets with several animations

A game character usually needs several animations: idle, walk, jump, hurt. You can organize them in two ways.

One sheet per animation. Make one project per animation (or duplicate the project in My Projects and redraw the frames), and export a separate sheet for each. Simple to manage, and each sheet is a single row. This is the easiest approach for beginners and small games.

One sheet for everything. Put every animation in one project, one after another in the timeline, and set Frames per row to the length of the longest animation. Each animation then starts on its own row if they all have the same number of frames. Rename the frames in your engine, or read the rectangles from the JSON. One sheet means one texture to load, which matters more on the web and on mobile.

Whichever you choose, keep a short naming plan: hero_idle, hero_walk, hero_jump. Consistent names save time when a project grows.

Frame size planning

Choose a frame size that fits the largest pose with a pixel or two to spare. A jump that stretches the character two pixels taller needs that room in every frame, or the top will be cut off. If one animation needs much more space (a sword swing, for example), it can live in a separate sheet with a larger frame size; or use Keep each size and let the JSON describe each rectangle.

Checking the export

Before using a sheet in a game, open the PNG in any image viewer and zoom in:

  • The image width should be frames per row × frame width plus padding. For the slime: 4 × 16 = 64 pixels.
  • Transparent areas should show as transparent (a checkerboard in most viewers), not white.
  • No frame should touch the next one if you set padding.

If something is off, go back to Sprite sheet, adjust the layout and download again. The sheet is always generated from your current project, so you never have to redraw anything.

Keep your project file

A sprite sheet is an export: it does not keep layers or the timeline. Before you close the project, also download the Editable project file from Export. It keeps every layer, frame and duration, so you can add frames or change colors later and export a new sheet in seconds.

What you practised

  • Choosing between a GIF and a sprite sheet.
  • Laying out a sheet with frames per row, padding and scale.
  • Reading the JSON frame list.
  • Importing pixel art into game engines with sharp, nearest-neighbor filtering.

You have finished the lesson path. To keep going, read the sprite maker guide for designing game characters, or the pixel art creator workflow for organizing larger projects.

Frequently asked questions

Should sprite sheets use padding?

Padding of 1 or 2 pixels prevents neighboring frames bleeding into each other when an engine scales or filters the texture. Without scaling or filtering, zero padding is fine and keeps the math simple.

Should I export the sheet at 1× or larger?

Usually 1×. Game engines scale sprites themselves. Use 2× or 4× only for tools or engines that cannot scale with nearest-neighbor filtering.

Can I combine images from other tools into one sheet?

Yes. Use Add PNG images to add PNG, WebP or GIF files of up to 512×512 pixels each. They can be mixed with the project's frames and reordered.

Written and tested by Kamel Medlej, who builds and maintains the tools on Pixel Art Drawing. Every step in this article was checked in the current version of the editor. Found a mistake? Tell us.