Sprite Sheet Packer
Published Updated
Arrange 1 to 200 frames in a grid and save one PNG with your choice of columns, padding and a 10% to 200% scale. Each frame is centred in a cell the size of the largest one; scaling smooths pixel art.
Cells, centring and the sheet size
Every cell is sized to the largest frame, times the scale. The sheet width is columns times cell width, plus padding between cells only, with none around the outside. Three sprites of 32 x 32, 48 x 16 and 16 x 48 pixels, in 2 columns with 8 px of padding, give 48 x 48 cells and a 104 x 104 sheet.
Frames are centred, not corner-aligned, with the position rounded to a whole pixel. In that example the three land at (8, 8), (56, 16) and (16, 56). If you slice the sheet in a game engine by frame size, the cell is the unit, and the sprite's position inside it is part of the picture.
Limits and defaults
From the page's code:
| Setting | Value |
|---|---|
| Images | 1 to 200 |
| Columns | 1 or more, default 4 |
| Padding | 0 or more pixels, default 8 |
| Scale | 10% to 200%, default 100% |
| Sheet side | At most 8192 px |
| Output | PNG, sprite-sheet.png |
With 64 x 64 sprites, 8 px of padding and 100%, 113 columns fit across 8192 px and 114 do not.
Are the pixels left alone? A test with generated sprites
We copied the page's layout and drawing code into a test page and ran it in Chromium 153.0.8010.12 (the build that ships with Playwright, headless, not Google Chrome), Firefox 155.0 and Playwright's WebKit build (user agent Version/26.6, not the Safari app). The sprites are generated opaque pixel art in four flat colors, with a seeded random pattern. After packing, we read the sheet back and compared it with the source pixels.
| Pack | Result in all three engines |
|---|---|
| The example from this page: 32 x 32, 48 x 16 and 16 x 48 sprites, 2 columns, 8 px padding, 100% | A 104 x 104 sheet. All three sprites were at the positions given above and matched the source pixel for pixel. The gaps and the empty cell were fully transparent. |
| Sprites of 16 x 16, 17 x 17 and 16 x 15 pixels, 3 columns, no padding, 100% | A 51 x 17 sheet. The 17 x 17 sprite sat at (17, 0), the 16 x 16 sprite at (1, 1) and the 16 x 15 sprite at (35, 1), and all three matched the source pixel for pixel. No pixel on the sheet had a color that is in none of the source sprites. |
With an odd size difference, half the difference is a half pixel, so the tool rounds each sprite's position to a whole pixel before drawing; a half-pixel position would be drawn blended with its surroundings. The price is that such a sprite sits half a pixel off true centre (the gap is 1 pixel on one side and none on the other), which matters only if you rely on exact centring, and then frames that are the same size, or that differ by an even number of pixels, avoid it. The results were the same in all three engines.
A second test used sprites of the same three sizes with random colors and alpha values from 0 to 255, made outside the browser as PNG files without a color profile. The packed sheet was decoded outside the browser too. The positions and the alpha values matched, and pixels with alpha 255 matched exactly. The color values of partly transparent pixels did not: where alpha was 128 to 254 they differed by at most 1 in Chromium 153 and WebKit and by at most 2 in Firefox, and where alpha was 1 to 31 by up to 127 in Chromium and WebKit and up to 253 in Firefox. Pixels with alpha 0 came out as black with alpha 0.
Scaling, packing 200 frames and the width limit
A 16 x 16 black and white checkerboard at 50% became one flat color, RGB 127, 127, 127 in Chromium 153 and Firefox 155 and 128, 128, 128 in WebKit 26.6. At 200%, the same checkerboard had four shades of grey between the black and the white in all three engines, which is the smoothing the page mentions.
For 200 generated frames of 64 x 64 pixels in 10 columns with 8 px padding, the sheet was 712 x 1432 pixels, which matches the formula above. Packing took under a second in each engine, in single runs. The PNG was 806,560, 570,536 and 797,584 bytes, so the file size depended on the engine's PNG writer, and the pattern was random noise. With 113 columns the sheet was 8,128 pixels wide and was accepted. With 114 columns the page refused it with a message that begins "That would produce a 8200 × 136px sheet".
Packing frames
Step 1
Add the frames
Drop up to 200 images. They are listed in the order they arrive, with arrows to move each one and a bin to remove it.
Step 2
Set columns, padding and scale
Defaults are 4 columns, 8 px of padding and 100%. Before you pack, a line under the controls shows the columns, rows and cell size, and the preview heading shows the sheet size.
Step 3
Pack and download
Press Pack Sprite Sheet. The card shows the pixel size and file size, and the download is named sprite-sheet.png.
Matching an engine
- Slicing by count. Godot's Sprite2D takes Hframes and Vframes, the number of frames across and down. Set Columns to Hframes. They are counts, so use 0 padding.
- Scale. Smoothing is the canvas default, which MDN says blurs enlarged pixels. At 50%, a black and white checker became mid-grey.
- Reverse job. To cut an existing sheet into files, use Sprite Sheet Splitter; to shrink the PNG afterwards, try PNG Compressor.
Sprite sheet questions
In what order are the frames placed?
Left to right, then down, in the order of the list. The tool does not sort by file name, so frame10 can land before frame2 if that is how they were added. Use the arrows to fix it.
What if my frames are different sizes?
Each cell is as wide as the widest frame and as tall as the tallest one. Smaller frames sit in the middle of their cell, so a short frame floats and a character's feet may not line up.
Is there a limit on the sheet?
Up to 200 images, and 8192 pixels on each side. Past that, a message states the size it would have made and asks for fewer columns, a smaller scale or fewer images.
Does it keep transparency?
Yes. The sheet is a PNG drawn on a canvas that starts clear, so empty cells and the gaps between them stay transparent.
Why does my pixel art look soft after scaling?
Scaled drawing is smoothed. MDN notes that the default blurs pixels when images are enlarged. A 2 x 2 checker at 200% came out with grey edges. Keep the scale at 100% for pixel art.
Can I take a sheet apart again?
Yes. Sprite Sheet Splitter slices a sheet into numbered PNG frames, by counts or by exact frame size.
Are my frames copied pixel for pixel at 100%?
For opaque pixels in a picture without a color profile, yes. A frame is centred in its cell and its position is rounded to a whole pixel, so a 16-pixel frame in a 17-pixel cell lands one pixel in from the cell edge instead of on a half pixel. In our test, 16 x 16, 17 x 17 and 16 x 15 opaque frames in 17 x 17 cells matched the source in every pixel, and no color appeared that was not in the sources, in Chromium 153, Firefox 155 and WebKit. When the size difference is odd, the frame sits half a pixel off true centre (the gap is 1 pixel on one side and none on the other). Partly transparent pixels keep their alpha, but their color values change, and fully transparent pixels come out as transparent black; the numbers are under the test table. Scales other than 100% are resampled and smoothed.
Is the packing the same in every browser?
The layout is, because it is plain arithmetic. The sheet size and the 113-column limit matched in three engines. The PNG size came from each browser's own PNG writer and differed between engines.