# GIF to Sprite Sheet

> A free online tool that places every frame of an animated GIF or WebP in one PNG sprite sheet as a grid, a row or a column, with an optional JSON file of frame positions and delays.

Use this GIF to sprite sheet tool to put every frame of an animated GIF into one PNG image. The tool keeps the frames in order, so you can load the whole animation as one picture, for example in a game engine. Pick your layout, then run the job. The GIF sprite sheet comes as a PNG, with an optional JSON file.

## Key facts

- Input: an animated GIF or WebP, up to 5 MB in the free tool and 10 MB when signed in, and up to 16 MP (4096 x 4096) per frame.
- Output: a PNG with one full frame per cell, left to right then top to bottom, empty cells at the end transparent; with the JSON option the download is a ZIP of sprite.png and sprite.json.
- A sheet can be at most 16384 px on a side and 16.8 megapixels in total; a bigger sheet is refused with its size in the message.
- In our test a generated 24-frame GIF of 160 x 120 px and 60 KB became an 800 x 600 px PNG of 56 KB with 5 columns and 5 rows; the test animation was generated by our scripts and results vary.
- The upload is deleted when the job ends and the result after 10 minutes; signed-in users pay 1 credit per file plus 1 credit for each started 10 MP of frames beyond the first 10 MP.
- Free without an account: up to 10 conversions per minute and 50 per day per visitor, no watermark. Signed in, each render costs 1 credit (100 free credits every month).
- Files are deleted automatically: 10 minutes after conversion without an account, 1 day with a free account.
- Developers can run the same render with POST https://api.aiipworld.com/v1/render and an API key (see the API docs page).

## How it works

1. Upload one animated GIF or animated WebP. The browser checks the file type, size and frame count before the upload.
2. Leave Layout on Grid with automatic columns, or choose One row or One column.
3. Click "Make sprite sheet" and wait for the job to finish.
4. Check the sheet size and the grid in the result panel.
5. Download your PNG sprite sheet.

## How to turn a GIF into a sprite sheet

Upload your animated GIF and click "Make sprite sheet". The tool reads every frame and places it in a cell of one PNG. You get one file that holds the whole animation.

The summary line shows the sheet size before the run, and the result panel shows it again after the job. Check it before you use the file in your project.

## What this GIF to sprite sheet tool does

This tool takes an animated GIF and builds a sprite sheet from its frames. Each cell holds the full picture of one frame. The frames stay in their original order.

The output is one PNG file. PNG is lossless, so the pixels in each cell match the frame they came from. The tool does not resize, trim or filter the frames.

## Grid, one row or one column

You can lay out the frames in a grid, in one row, or in one column. The default is a grid with automatic columns. In that case the column count is the square root of the frame count, rounded up.

You can also set the number of columns yourself. A row suits short animations, and a column suits tall game sprite layouts. Pick the layout that fits how your project loads images.

## How the frames are placed

Frames are placed from left to right, then from top to bottom. The first frame sits in the top-left cell. The last frame sits in the cell that comes last in the sequence.

Frames are not trimmed and duplicate frames are not removed. Every frame keeps its full size, so each cell is the same size.

## The JSON file with frame positions and delays

You can add a JSON file that lists the frame size, the position and the delay of every frame. When you choose this option, the download is a ZIP file with sprite.png and sprite.json.

The JSON file lists version, order, sheet size, frame size, columns, rows, frames, loop count and total duration in ms. It also lists each frame's index, x, y and delay_ms. Browsers play a delay of 10 ms or less as 100 ms, and the JSON lists delays the way a browser plays them.

## Transparency and empty cells

The PNG keeps transparency when your frames have transparent pixels. It also keeps transparency when the last row is not full. Empty cells at the end of the sheet are transparent.

GIF frames have only fully transparent or fully opaque pixels. Your sheet keeps those values. Padding and spacing between cells are not added by this tool.

## Sheet size limits

A sprite sheet can be at most 16384 px on a side. The total can be at most 16,777,216 pixels, which is 16.8 megapixels. A bigger sheet is refused, and the message shows the size it would have had.

The page shows the same warning before the run. The result is also limited to 20 MB. If your sheet is too big, change the columns value or resize the GIF first with the resize or trim tools.

## Limits for animations

When you are signed in, an animation can have up to 300 frames and 64 MP in total pixels. Total pixels are frame width x frame height x number of frames. Without an account, the limits are 100 frames and 16 MP.

Each frame is limited to 16 MP (4096 x 4096). Over a limit, the job fails and your credits are returned. The base price is 1 credit per file. It includes 10 megapixels of animation. Each started 10 megapixels above that adds 1 credit.

## Which files the tool accepts

This page takes an animated GIF or an animated WebP. A one-frame file also works and gives a sheet with one cell. A PNG, JPG or other file is refused with a message that says so. The tool reads the file type from the file content, not the file name.

Without an account, you can upload up to 5 MB per file, and 30 files per day. Signed-in users can upload up to 10 MB per file. Each frame can be up to 16 MP (4096 x 4096). A result over 20 MB fails with an "output too large" message.

## Make a sprite sheet from code

Send a POST request to https://api.aiipworld.com/v1/image-jobs with the raw file bytes as the body. Set Content-Type to image/gif or image/webp. Add op=gif_edit and action=sprite as query parameters.

Authorize with a Bearer API key or the x-api-key header. Send timeout_sec=60 for animations, which is the maximum. The page shows a ready cURL, Node and Python example that follows the settings you choose. Full docs are at /docs/#image-jobs.

## Privacy: what happens to your file

Your file is sent to our server, where it is processed with sharp, an open-source image library built on libvips. This is ordinary image processing, not artificial intelligence. Your file is deleted as soon as the job ends, whether it succeeds or fails.

Free web results are kept for 10 minutes. No history is kept, and download links are short-lived. You must have the right to use the files you upload, as set out in the Acceptable Use Policy.

## Questions

### Can I make a sprite sheet from a GIF for free?

Yes, you can make a GIF sprite sheet for free within the daily limit, with no signup. Without an account, the tool allows 30 files per day per visitor.

### How are the frames ordered in the sheet?

Frames go from left to right, then from top to bottom, in their original order. The first frame is in the top-left cell.

### What is a sprite sheet?

A sprite sheet is one image that holds several frames in a grid, row or column. Games and apps often load the whole animation from one file.

### Can I choose the number of columns?

Yes, you can set the Columns value for a grid. If you leave it empty, the tool uses the square root of the frame count, rounded up.

### What is in the JSON file?

The JSON file lists the version, order, sheet size, frame size, columns, rows, frames, loop count and total duration in ms. It also lists the x, y and delay_ms for every frame.

### Does the sheet keep transparency?

Yes, the PNG keeps transparency when your frames have it, or when the last row is not full. Empty cells at the end are transparent.

### Why was my sheet refused as too big?

The sheet is over the limit of 16384 px on a side or 16.8 megapixels in total. Change the columns value, or resize or trim the GIF first.

### Can I make a sprite sheet from an animated WebP?

Yes, animated WebP is accepted as well as GIF. A PNG, JPG or other still file is refused.

### Can I turn the sprite sheet back into a GIF?

Yes, use the Spritesheet to GIF page. It takes one still picture and builds an animation from its grid of frames.

### How long is my file kept?

Your uploaded file is deleted as soon as the job ends. Free web results are kept for 10 minutes, and no history is kept.

### Can I make sprite sheets in code?

Yes, send a POST request to the image-jobs API with op=gif_edit and action=sprite. Use timeout_sec=60 for animations.

## Related

- [Spritesheet to GIF](https://aiipworld.com/tools/sprite-sheet-to-gif/index.md)
- [GIF Frame by Frame: Split a GIF into Frames](https://aiipworld.com/tools/gif-to-frames/index.md)
- [GIF Trimmer: Trim a GIF by Frame or Time](https://aiipworld.com/tools/gif-trimmer/index.md)
- [GIF Resizer: Resize Animated and Still GIFs Online](https://aiipworld.com/tools/resize-gif/index.md)

Page: https://aiipworld.com/tools/gif-to-sprite-sheet/
