Sprite Sheet to GIF: Turn Your Animation Into a GIF
Turn a sprite sheet into an animated GIF for a devlog or store page: the right frame timing, a crisp whole-number scale, clean transparency, no wobble.

Your character's run cycle looks great in the game. Now you want it in a devlog, on your store page, or in a post, and the only thing you have is the sprite sheet: one wide PNG with eight frames side by side. Nobody can see an animation in a sheet. So you open an image editor, cut the frames into layers one by one, guess a delay for each, export, and get a GIF that plays too fast, sits in a tiny box, and has a grey fringe around the sword.
Turning a sprite sheet into a GIF is a small job, but it has four places where it goes wrong: the timing, the size, the transparency and frames that are not lined up. This guide goes through each one, then shows the Sprite Animation Previewer doing the whole job in your browser.
Step 1: find the frames
A sheet is a grid. Before anything can play, you need to know how big one cell is and how many cells belong to the animation. Most sheets use one row per animation (idle, walk, attack) and cells of a fixed size, such as 32x32 or 48x48. Count the frames in the row you want and check the empty cells at the end: a row of eight cells that holds six frames should give a six-frame GIF, not a GIF that blinks to nothing twice per loop.

If your frames are loose files instead of a sheet, the order matters. Files named walk_1 to walk_12 sort as walk_1, walk_10, walk_11, walk_12, walk_2 in a plain alphabetical list, so frame 10 jumps in after frame 1. Sort them by the number, not by the text.
Step 2: get the timing right
Game animations are set in frames per second. GIFs are not. A GIF stores a delay for every frame in hundredths of a second. That works out neatly for some speeds: 10 fps is 10 hundredths per frame, 5 fps is 20. It does not work for others. At 12 fps one frame lasts 8.33 hundredths, which a GIF cannot store. Round every frame to 8 and the loop runs faster than the game; round to 9 and it runs slower.

The fix is to spread the rounding: 8, 9, 8, 8, 9, 8 and so on, so each frame is as close as it can be and the whole loop keeps the length it has in your game. Also avoid tiny delays. Browsers play a delay of 0 or 1 hundredth much slower than written, so a GIF made for "as fast as possible" ends up slow. Two hundredths is the shortest delay that plays as written.
Two more timing choices change how a loop feels:
- Ping-pong plays the frames forward and then backward (1, 2, 3, 4, 3, 2). It suits idle breathing, a floating crystal or a torch flame, and doubles the length of a short loop with no new art.
- Hold the last frame of an attack or a death by giving it a longer delay, so the pose reads before the loop starts again.
Step 3: make it big enough, and keep it crisp
A 32x32 character at its real size is a speck on a web page. Scale the GIF up before you post it, and scale by a whole number (2x, 3x, 4x) with nearest neighbour, so every pixel becomes a clean square of 2x2, 3x3 or 4x4 pixels. A scale like 2.5x, or any smooth resize, makes some pixels wider than others and blurs the edges, and pixel art loses exactly what makes it pixel art.
As a guide, a 32x32 sprite at 4x is 128x128 and reads well in a post; a 16x16 sprite wants 6x or 8x. Bigger GIFs are bigger files, so stop at the size that reads.
Step 4: decide on the background
A GIF has hard transparency only. Each pixel is either fully see-through or fully solid; there is nothing in between. For pixel art with hard edges that is fine, and a see-through GIF sits nicely on any page. For art with soft, half-transparent edges (a glow, a shadow, smoothed outlines), those edge pixels have to become either solid or gone, which is where the grey or dark fringe comes from.
So pick one of two:
- Transparent: best for clean pixel art that will sit on pages of different colours.
- A solid colour: best for soft-edged art, glows and shadows, or when you want the GIF to look the same everywhere. Choose a colour close to the page it will sit on, or a neutral dark one for a devlog.
A GIF also has at most 256 colours per palette. Pixel art almost always fits; a painted sprite with gradients may lose some shades.
Step 5: check for wobble before you share it
A GIF shows every mistake in an animation, because people watch it loop again and again. The most common one is a frame drawn a pixel or two off-centre: in the sheet it looks fine, in motion the character jumps sideways or bobs up and down once per loop. Step through the frames one by one and watch the feet. If one frame's feet are not where the others' are, move that frame back before you export, both in the GIF and in the sheet your game uses.
Turning on an onion skin helps here: it shows the frame before and the frame after, faintly, under the current one, so a pop or a slide in the motion shows at once.
The fast way: the Sprite Animation Previewer
The Sprite Animation Previewer does all five steps on one page, in your browser:
- Drop a sprite sheet and it finds the grid, or drop loose frames and it orders them by name, with walk_2 before walk_10.
- Play any row at 1 to 30 fps, with ping-pong, flip, frame-by-frame steps, zoom and a transparent, dark, light, green or own-colour background.
- The onion skin shows the frame before in red and the one after in blue. Frames drawn off-centre are counted and marked, and one tick lines them up on their feet or their middle.
- The GIF comes out at 1x, 2x, 3x, 4x, 6x or 8x with no blur, with the delays spread so 12 fps stays 12 fps, looping forever. On the transparent background, see-through pixels stay see-through; on a colour, every pixel is solid.
Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.
Start: 3 days for $1 See everything it includesThe same animation in your game
The GIF is for people. Your engine wants the sheet and a list of frames. The Previewer saves the lined-up sheet as a PNG and a Godot 4 SpriteFrames file next to the GIF, or all three in one ZIP. Keep the .tres file in the same folder as the PNG, put it on an AnimatedSprite2D, and every row of the sheet becomes its own animation at the speed you set. A ping-pong loop is written out as frames, and a left-facing version needs no extra art: tick Flip H on the node.
In other engines, use the PNG with the cell size you already know: Unity's Sprite Editor slices it by grid, and most 2D frameworks read a row of equal cells directly.
A short checklist
- The right row and the right number of frames, with no empty cells.
- The speed from your game, with the delays spread so the loop keeps its length.
- A whole-number scale with nearest neighbour.
- Transparent for hard-edged pixel art, a solid colour for soft edges.
- No frame that pops or slides; fix it in the sheet too.
The Sprite Animation Previewer is one of 44 tools in Gridwright, next to 150 asset packs whose characters already come as sheets with their animations, ready to play.
Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.
Start: 3 days for $1 See everything it includes