A sheet drawn on a grid
A sprite sheet is many small pictures packed onto one canvas: the frames of a walk cycle, a set of icons, the tiles of a game level. Whoever packed it chose a cell size, and usually two more numbers: a border round the whole sheet and a gap between frames, so that texture filtering in a game engine does not bleed one frame into the next. To get the frames back you need all three numbers, and a general image splitter only asks for one of them.
This page asks for each of them separately. The cell is the size of one frame. The margin is the border before the first column and above the first row. The spacing is the gap between neighbouring cells, across and down. With those set, the number of whole cells that fit is simple arithmetic, the overlay draws every cell on the sheet, and anything past the last whole cell is reported as leftover rather than turned into a half-frame.
A worked example
The test sheet for this page is 288 × 288 pixels: 32-pixel cells, a 2-pixel margin and 4 pixels between cells. The same function the tool runs, evaluated when this page was built, finds 8 × 8 = 64 cells with 2 pixels left over on the right and 2 at the bottom — the closing margin.
| File | Row, column | From x, y | Size |
|---|---|---|---|
| hero_1_1.png | 1, 1 | 2, 2 | 32 × 32 |
| hero_1_2.png | 1, 2 | 38, 2 | 32 × 32 |
| hero_2_1.png | 2, 1 | 2, 38 | 32 × 32 |
| hero_8_8.png | 8, 8 | 254, 254 | 32 × 32 |
Empty cells, counted rather than guessed
Packed sheets rarely fill their last row. A twelve-frame animation on a four-by-four grid leaves four cells with nothing in them, and a splitter that writes them anyway hands you four blank files to find and delete. With “Skip fully transparent cells” on, every cell is read at full resolution and dropped only if every one of its pixels is completely transparent. The overlay crosses those cells out, the status line counts them, and the JSON index lists them, so frame numbers stay honest: the file called hero_04_01 is still the cell in row four, column one, whatever was skipped before it.
Sheets with a solid background colour instead of transparency have no empty cells by this test, which is on purpose: a colour the tool decided was “background” would sometimes be the colour of a frame. Those sheets are cut whole, cell by cell.
Names and the index
Files are named after the sheet with the row and column (hero_01_01, hero_01_02 …) or with a running index (hero_01, hero_02 …), zero-padded so any file manager lists them in order. The optional JSON index records every frame’s rectangle on the original sheet, which is what an engine import or a build script usually wants.
This page cuts regular grids. Sheets packed by an atlas tool into irregular rectangles need that tool’s own data file; the custom splitter’s free guides can handle a few irregular rows by hand.
How to do it here
- Open the sheet. Drop the sprite sheet, browse for it, or paste it.
- Set the cell. Pick a common size or type the cell width and height; the overlay redraws every cell.
- Set margin and spacing. Type the border round the sheet and the gap between cells until every outline sits on a frame.
- Save the frames. Choose names and format, leave empty cells skipped, and save one ZIP with the optional JSON index.


