AZTools.us

Sprite Sheet Slicer & Texture Atlas Packer

Numbered boxes + animation preview Live walk-cycle preview

Adjustments

Load a file to unlock this tool’s controls:

Numbered boxes + animation preview

Runs directly on the web inside your browser. Your original file is never modified or uploaded.

How Sprite Sheet Slicer & Texture Atlas Packer Works

This tool cuts a sprite sheet into separate frames, either on a regular grid or by finding each sprite automatically, and previews them as an animation. It can also pack several images into one sheet. Both write a JSON atlas in a TexturePacker-style JSON Hash layout. Everything runs in your browser.

How to slice a sprite sheet

  1. Drop a .png, .webp, .gif, .jpg or .jpeg sheet onto the workspace. A sheet with transparency opens in “Auto-detect”; an opaque one opens in “Grid”.
  2. “Grid”: choose “Columns × rows” or “Cell size”, then set “Cols” and “Rows” or the cell W and H, plus “Margin” and “Spacing” in pixels. The tool first guesses a grid from the sheet size. “Skip empty cells” drops cells with no sprite pixels.
  3. “Auto-detect”: each group of touching pixels becomes a box, numbered in reading order. Use “Alpha cut-off” to decide how transparent a pixel must be to count as background, and “Merge parts within” to join detached parts such as a sword or a shadow (default 4 px).
  4. For sheets without transparency, turn on “Background colour key”. The tool guesses the colour from the sheet’s border; change it with the swatch or “Pick from sheet”, and adjust “Tolerance”.
  5. Click a box to skip or include it, or use “Include all” and “Skip all”. The preview plays the included frames; set the speed with “FPS” (1–30).
  6. Choose .ZIP, .PNG or .JSON and export.

What each export contains

Exports (name = the loaded file’s name)
FormatGrid or Auto-detectPack images
.ZIPOne PNG per included box and name.json, whose coordinates refer to the original sheet. Files and atlas keys use the box numbers shown on screen (name_01.png, name_02.png …), so a skipped box leaves a gap. With the colour key on, the keyed copy name-keyed.png is added and the atlas points to itname-sheet.png and name-sheet.json
.PNGThe included frames repacked into one sheet, name-sheet.png, with 2 px padding (no atlas)The packed sheet only
.JSONOnly the atlas, pointing to the original sheet file. The colour key is not applied; choose .ZIP to get the keyed sheetOnly the atlas for the packed sheet

The JSON atlas format

  • frames is an object keyed by frame name. Each entry has frame (x, y, w, h on the sheet), rotated (always false), trimmed, spriteSourceSize and sourceSize.
  • When a packed sprite was trimmed, spriteSourceSize gives the trimmed area’s offset inside the original image and sourceSize the original width and height.
  • animations holds one list, named after the loaded file, with every frame name in order.
  • meta holds the image file name, format RGBA8888, the sheet size and scale 1.
  • Phaser expects atlas data in the JSON Hash or JSON Array format.

Source: Phaser docs: LoaderPlugin atlas()

Packing several images into one sheet

In “Pack images” the loaded file is the first image; add more with “+ Add images”. Images are placed in rows, tallest first, with “Padding” between them (default 2 px). “Trim transparent edges” (on by default) cuts empty borders, “Power-of-two size” rounds the sheet up to sizes such as 512 or 1024, and the width menu sets “Width: auto” or a maximum from 256 to 4096 px. Frame names are the original file names. A sheet larger than 8192 px on either side is refused.

PixiJS’s Spritesheet reads the same layout: frames keyed by name, an animations list and a meta block with the image name.

Source: PixiJS docs: Spritesheet

Questions

Auto-detect splits one character into several boxes. What do I do?
Raise “Merge parts within” so parts a few pixels apart join into one box; lower it if unrelated sprites merge. Click a stray box to skip it.
My sheet has a solid background. Can it still be sliced?
Yes. Use “Grid” if the sprites sit on a regular grid, or turn on “Background colour key” so pixels close to that colour count as background. With the key on, exported frames have that colour made transparent.
Is my sheet uploaded?
No. Detection, slicing and packing happen in your browser tab, and the files are saved straight to your device.