GIF to sprite sheet
Convert a GIF to a PNG sprite sheet in your browser, with complete animation frames and a JSON map that keeps their timing.
Choose a GIF
Reading frames…
Loading the lantern sample…
Choose columns, padding and frame size
Columns sets the number of frames across. A short animation can be one row; a longer one usually fits better in several rows. Frames are laid out left to right, then top to bottom, in the order the GIF plays. If the last row has spare cells, those pixels stay transparent and the JSON contains only real frames. The size below the sheet is the exported size, rather than the preview's display size.
Padding goes between cells and around the outside. Two pixels of padding separates nearby artwork while you inspect it. Frame width and height control each cell. The source image is scaled by the smaller of the two size ratios and centered, so changing one dimension never squeezes a character. For pixel art, try 32 to 64 or 64 to 128; those whole-number enlargements keep the original pixel edges even.
Keep the original frame timing
A GIF can hold one pose for 100 milliseconds and another for 300. Treating both as one tick at a fixed frame rate would change the animation. This preview reads the source delays, and Frame JSON writes a duration beside each rectangle. A missing or zero source delay becomes 10 milliseconds. If an engine only accepts a fixed frame rate, repeat a held pose for the necessary ticks or set its frame-duration control.
The lantern sample is original artwork made for this page. It has six 32 × 32 frames with holds of 100, 100, 300, 100, 100 and 300 milliseconds. That is a one-second loop. With three columns and two pixels of padding, the result is 104 × 70 pixels: three 32-pixel cells plus four gaps across, and two cells plus three gaps down. Download the source GIF to check those numbers.
Recover complete frames from patches
Many GIFs save a complete first picture, then small rectangles that change. Exporting those rectangles directly would lose everything outside the update. The converter first rebuilds a full canvas for each moment. After displaying a frame it either keeps that canvas, clears the changed rectangle, or restores the preceding canvas, according to the GIF's disposal instruction. Only then does it draw the next update.
Try the four-frame disposal test and its expected pixels. On its 4 × 3 canvas, a green patch appears over red, then disappears when the preceding canvas is restored; a blue patch is cleared before the final white pixel arrives. The exported frames should have holds of 100, 300, 100 and 200 milliseconds. This tiny example makes a trail or missing background easy to spot.
Use the PNG and JSON together
Each JSON entry has a name such as frame-001, a frame rectangle with x, y, w and h, and a duration. Coordinates start at the top-left of the PNG. The metadata names gif-sheet.png and its full dimensions. Repacking changes the coordinates, so download both files again after changing columns, frame size or padding. Keep each pair in the same game folder.
The sprite animation maker can read this hash-style frame JSON and show the frame rectangles; its timeline controls let you choose a new order or speed. For independent PNG poses, use the sprite sheet maker to pack them directly. To split an exported sheet into files again, open the sprite sheet cutter and match the cell size, outer offset and gap.
Load gif-sheet.png and gif-sheet.json. For each frame, draw the source rectangle at frame.x, frame.y, frame.w, frame.h and hold it for duration milliseconds. Advance in JSON order and wrap back to frame-001. Do not draw the entire sheet for each animation frame.Compare GIF conversion options
SpriteAI's converter includes timed JSON, sample animations and frame editing. ConvertICO offers packed layouts, trimming and several engine data formats. This page keeps a regular grid and provides the small disposal fixture above so you can inspect exactly how partial updates become complete poses.
Browsers with ImageDecoder use their native GIF decoder. Others use the vendored MIT-licensed omggif reader with the same full-frame composition steps. A compact GIF may expand into many large pictures, so the tool checks dimensions and frame count before decoding. If the sheet-size message asks for a smaller output, reduce the frame dimensions or padding; the existing valid preview stays available while you choose another layout.
Questions
How do I convert a GIF to a sprite sheet?
Drop the GIF into the tool, set the number of columns and the padding, then download Sheet PNG and Frame JSON. Every GIF frame becomes a cell in playback order. You can change the frame width and height before exporting; the picture fits inside each cell without stretching.
Does the sprite sheet keep GIF frame timing?
The JSON keeps each frame's duration in milliseconds, and the preview uses those durations. The PNG only stores pictures. Keep the matching JSON if your game needs the original rhythm, especially when one frame is held longer than the others.
Does GIF transparency survive conversion?
Yes. Transparent pixels remain transparent in the exported PNG. The decoder rebuilds each full frame from partial GIF updates and applies disposal before drawing the next frame. Padding is transparent too; an opaque background already in the GIF remains part of the image.
Can I resize frames while converting?
Yes. Set a frame width and height and the image is scaled to fit, centered inside that cell, with nearest-neighbor resizing. A square GIF in a wide cell keeps its square shape and gains transparent space at the sides. Use a whole-number scale for sharp pixel art.
Is my GIF uploaded?
No. Decoding, layout and PNG/JSON export happen in this browser tab. The sample is downloaded from this site; your chosen GIF is read from your device. Inputs are limited to 16 MB, 256 frames and 24 million decoded pixels together to keep the tab responsive.
Put your assets into a playable game. Try the ten game templates or get the kit.