How to split sprite sheets into individual sprites

Joachim Grill
Last updated:
How to split sprite sheets into individual sprites

Slice sprite sheets into separate sprites

Do you want to break a sprite sheet into individual sprite images so you can repack them? Or just use a few single sprites from an existing sheet?

TexturePacker comes with a built-in Sprite Sheet Splitter that makes this incredibly easy. Download TexturePacker for macOS, Windows, or Linux:

The basic workflow is just three steps:

  1. In TexturePacker’s main window, click "Split Sheet" in the toolbar to open the Sprite Sheet Splitter.
  2. Click "Open sprite sheet" and select your sheet image (or drag & drop it into the dialog).
  3. Click "Save sprites" to export all detected sprites into a folder next to the original sheet.
Sprite Sheet Splitter

Splitting modes and settings

There are three ways to split a sheet:

  1. Grid: when all sprites have the same size and are laid out evenly
  2. Rectangular: when sprites are separated by transparent pixels
  3. Data file: when you have an accompanying data/atlas file describing sprite positions

Grid

If all sprites have the same dimensions and are arranged in a uniform grid, use this mode.

  • Set the number of Columns and Rows: TexturePacker will calculate the resulting sprite size. Alternatively, enter Sprite width and Sprite height and the grid (rows/columns) is derived automatically.
  • Sprite padding sets the spacing between sprites.
  • Border padding sets the spacing between the outermost sprites and the texture’s border.

When saving, sprites are numbered incrementally. Use Sprite name template to control the exact file naming pattern.

Grid-based sprite sheet splitter

Rectangular

If sprites have different sizes and aren’t arranged on a strict grid, choose Rectangular mode. TexturePacker searches for rectangular areas that are fully surrounded by transparent pixels and saves these as sprites. This mode requires a sheet with an alpha channel. It won’t work for sheets without transparency.

Note: If a visual sprite consists of multiple parts separated by transparency, each part may be detected as a separate sprite.

Rectangular detection

Data file

If a matching data/atlas file exists, this is often the best option. TexturePacker automatically looks for a file with the same base name as the sheet, for example: mysheet.png + mysheet.plist (or .json, .atlas, .tpsheet, …). It supports many popular game frameworks:

  • Cocos2d/Cocos Creator (plist)
  • Godot (tpsheet)
  • Phaser (json)
  • LibGDX (atlas)
  • PixiJS (json)
  • Spine (atlas)
  • Unity (tpsheet)

The data file contains more than just sprite positions and sizes, it also records if any transparent borders were trimmed or if sprites were rotated during packing. TexturePacker automatically reverses these optimizations when splitting, so you get pixel-perfect original sprites back.

On the Data file tab, TexturePacker shows whether it found a data file and how many sprites it defines:

Data file tab

Move the mouse cursor over a sprite in the preview to see a tooltip with its name. This name is used for files when saving.