GIF to Sprite Sheet Converter
Lay out every frame of an animated GIF on one PNG sprite sheet: as a grid, a single row or a column. Transparency is kept. Free, and nothing is uploaded.
How it works
- 1Drop a GIF, or paste one with Ctrl+V.
- 2Pick a layout: grid, one row or one column.
- 3Make the sprite sheet and download the PNG.
How the sheet is built
The tool rebuilds each frame as a complete picture, draws the frames onto one canvas and saves it as a PNG. There is no padding between cells. In the Grid layout the number of columns is the square root of the frame count, rounded up, and the rows follow. A 30-frame GIF becomes 6 columns by 5 rows. A 10-frame GIF becomes 4 by 3, which leaves 2 empty cells at the end.
Using the sheet in a game or in CSS
A PNG holds no timing, so the frame delays of the GIF are not stored. Work out the speed yourself by dividing the frame count by the length of the GIF in seconds, and use that as the frame rate. A sprite animation normally plays at one rate, so a GIF with uneven delays will not keep its exact timing. Enter the numbers from the badge in your engine: Godot's Sprite2D takes Hframes and Vframes, Phaser's spritesheet loader takes frameWidth and frameHeight, and Unity's Sprite Editor can slice a sheet with Grid By Cell Count. Some engines count empty cells as frames, so stop the animation at the real frame count. For CSS, use the frame count as the number in steps().
When the sheet is too big
The tool refuses a sheet wider or taller than 16,384 px, or larger than 268 million pixels in total, because browsers cannot draw a canvas much past those limits. One row hits the limit first: 60 frames of a 480 by 270 px GIF would be 28,800 px wide. As a grid, the same GIF is 8 columns by 8 rows, 3,840 by 2,160 px. If even the grid is too big, shrink the cells with Resize GIF, or drop frames you do not need with GIF Cutter.
File size
The PNG is lossless and holds every pixel of every frame, so it is usually larger than the GIF, which can store only what changed between frames. Every cell is the full size of the GIF, so empty margin around a character makes each cell bigger in pixels. Crop the GIF first and the sheet gets smaller.