Skip to main content

Overview

Sprite sheets (also called texture atlases) pack multiple animation frames or sprites into a single image file. This is the standard format for delivering game assets, as it reduces file count, improves loading performance, and simplifies asset management.
Aseprite provides powerful sprite sheet export options with automatic packing, trimming, and metadata generation.

Why Use Sprite Sheets?

Better Performance

One image loads faster than hundreds of individual frames. Reduces HTTP requests and disk I/O.

Smaller File Size

Eliminates redundant headers and metadata. Can be compressed more efficiently.

Easier Management

One file instead of many. Simpler version control and asset pipeline.

GPU Efficiency

Single texture binding. Enables efficient batching and rendering.

Exporting Sprite Sheets

1

Open Export Dialog

Go to File → Export → Export Sprite Sheet or press Ctrl/Cmd + Alt + Shift + S.
2

Choose Layout

Select how frames should be arranged:
  • Horizontal Strip: All frames in one row
  • Vertical Strip: All frames in one column
  • Square: Packed into a square grid
  • Packed: Optimal automatic packing
3

Configure Options

Set export parameters:
  • Trim empty pixels
  • Add borders/padding
  • Include metadata (JSON/XML)
  • Split layers or tags
4

Export

Choose your output format (PNG recommended) and export both the image and metadata.
Always export with metadata! The JSON or XML file tells your game engine where each frame is located.

Export Layouts

All frames arranged in a single row, left to right.Best for:
  • Simple animations with few frames
  • Side-scrolling game sprites
  • Quick manual implementation
# CLI: Export as horizontal strip
aseprite --batch sprite.aseprite \
  --sheet-type horizontal \
  --sheet output.png
Can become very wide with many frames. May hit texture size limits.

Export Options

Remove transparent pixels around each frame to save space:
  • Trim Cels: Remove empty space from individual frames
  • Trim Sprite: Remove border space from entire sheet
  • Keep Sprite Size: Maintain original canvas size
# CLI: Export with trimming
aseprite --batch sprite.aseprite \
  --trim \
  --sheet output.png
Trimming significantly reduces texture memory but requires metadata to correctly position frames.
Add spacing between frames and around edges:
  • Border Padding: Space around entire sheet
  • Shape Padding: Space between individual frames
  • Inner Padding: Space inside each frame
# CLI: Add 1px padding between frames
aseprite --batch sprite.aseprite \
  --sheet-pack \
  --shape-padding 1 \
  --sheet output.png
Add 1-2px padding to prevent texture bleeding when using mipmaps or texture filtering.
Export frame position data in various formats:JSON Hash:
{
  "frames": {
    "sprite-0.aseprite": {
      "frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
      "duration": 100
    }
  }
}
JSON Array:
{
  "frames": [
    {
      "filename": "sprite-0.aseprite",
      "frame": { "x": 0, "y": 0, "w": 32, "h": 32 }
    }
  ]
}
XML:
<sprite>
  <frame name="sprite-0" x="0" y="0" w="32" h="32" />
</sprite>
JSON is recommended for modern game engines. Most frameworks parse it automatically.
Control how layers are exported:
  • Merge Layers: Flatten all visible layers (default)
  • Split Layers: Export each layer as separate sheet
  • Split Tags: Export each animation tag as separate sheet
  • Split Grid: Export based on grid selection
# CLI: Split by animation tags
aseprite --batch sprite.aseprite \
  --split-tags \
  --sheet-type packed \
  --sheet output-{tag}.png \
  --data output-{tag}.json
Use {tag}, {layer}, or {tagframe} placeholders in filenames for automatic naming.

Command Line Export

Automate sprite sheet generation with the Aseprite CLI:
# Simple sprite sheet export
aseprite --batch input.aseprite \
  --sheet-type packed \
  --sheet output.png \
  --data output.json
CLI Placeholders:
  • {title}: Sprite filename without extension
  • {tag}: Current tag name
  • {layer}: Current layer name
  • {frame}: Current frame number
  • {tagframe}: Frame within current tag

Importing Sprite Sheets

Aseprite can also import sprite sheets back into frames:
1

Open Import Dialog

File → Import Sprite Sheet
2

Select the Image

Choose your sprite sheet PNG file.
3

Define Frame Layout

Tell Aseprite how frames are arranged:
  • Grid dimensions (rows × columns)
  • Or select frames manually
4

Import

Aseprite creates a new sprite with each frame on the timeline.
# CLI: Import sprite sheet
aseprite --batch \
  --sheet-type rows \
  --sheet-columns 8 \
  --sheet spritesheet.png \
  --save-as output.aseprite

Game Engine Integration

Import sprite sheets into Unity:
  1. Import the PNG file into your Assets folder
  2. Select it in the Project panel
  3. Set Texture Type to Sprite (2D and UI)
  4. Set Sprite Mode to Multiple
  5. Open Sprite Editor
  6. Use Slice → Automatic or import JSON metadata
  7. Apply and create animations
Use a Unity sprite sheet plugin to automatically parse Aseprite JSON metadata.

Optimization Tips

Use Power of 2 Sizes

Export sheets with dimensions like 512×512, 1024×1024, or 2048×2048 for best GPU compatibility.

Trim Transparent Pixels

Enable trimming to remove wasted space, especially for sparse animations.

Add Padding

Include 1-2px padding between frames to prevent texture bleeding with mipmaps.

Compress Wisely

Use PNG-8 for indexed color, PNG-24 for RGBA. Consider WebP for web games.

Split Large Sheets

Keep sheets under 2048×2048 for mobile compatibility. Split by animation or character.

Include Metadata

Always export JSON metadata. It’s tiny and makes integration much easier.

Advanced Techniques

Automate sprite sheet export with Lua:
-- Export all open sprites as sprite sheets
for i, sprite in ipairs(app.sprites) do
  app.command.ExportSpriteSheet {
    ui = false,
    type = "packed",
    textureFilename = sprite.filename:gsub(".aseprite", "-sheet.png"),
    dataFilename = sprite.filename:gsub(".aseprite", "-sheet.json"),
    dataFormat = "json-array",
    trim = true,
    shapePadding = 2
  }
end
Process entire directories:
#!/bin/bash
# Export all characters as sprite sheets
for dir in characters/*/; do
  char=$(basename "$dir")
  aseprite --batch "$dir"*.aseprite \
    --sheet-type packed \
    --merge-duplicates \
    --trim \
    --sheet "output/$char-sheet.png" \
    --data "output/$char-sheet.json"
done
Combine multiple sprites into one sheet:
# Combine all enemy sprites into one atlas
aseprite --batch \
  enemy1.aseprite \
  enemy2.aseprite \
  enemy3.aseprite \
  --sheet-type packed \
  --sheet enemies-atlas.png \
  --data enemies-atlas.json
Great for level-specific atlases that load all needed sprites at once.

Troubleshooting

Cause: Trim settings are too aggressiveFix: Disable trimming or adjust sprite canvas size to include padding
Cause: No padding between frames with texture filtering enabledFix: Add 1-2px shape padding in export settings
Cause: Incorrect format or file pathFix: Verify JSON format matches engine expectations. Check file paths are relative.
Cause: Too many frames or not using packed layoutFix: Split into multiple sheets by animation tag or character state

Animation Timeline

Learn how to create the animations you’ll export

CLI Overview

Master command-line batch processing

GIF Export

Export animations as GIF files instead

Scripting API

Automate exports with Lua scripts

Build docs developers (and LLMs) love