Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

GIF to sprite sheet, ready for games.

Drop a GIF, an animated WebP or PNG, or a folder of frames, and get every frame laid out in a grid on one PNG. Choose a grid, one row or one column, the frames to use, the padding, the scale and whether to keep every frame. You also get a JSON file with each frame's position and time, in the hash or array layout game engines like Phaser read, and a CSS animation that plays the sheet on a web page with each frame's own timing. Save all three in one ZIP.

Need a custom tool, app or website? Contact us 

Frames are read and the sheet is made in your browser. Nothing is uploaded.

What you get

One picture, every frame.

01 / PNG

Frames in a grid

Every frame at the same size, left to right and top to bottom, with see-through gaps or a colour key.

02 / JSON

Where each frame is

Position, size and time for each frame, in the hash layout that Phaser and many other engines load.

03 / CSS

Play it on a page

A ready animation with steps(), so the sheet plays as a moving picture on a website with no script.

Guide

How to turn a GIF into a sprite sheet, for a game or a web page.

A GIF to sprite sheet converter takes every frame of an animation and lays them out in a grid on one PNG picture. A game or a web page then loads that single picture and shows one cell at a time, which plays the animation. This tool also writes a JSON file with each frame's position, size and time, and a CSS animation that plays the sheet on a website without any script.

How to make a sprite sheet

  1. Drop a GIF, an animated WebP or an animated PNG on the box. Or drop several separate pictures at once; they are sorted by name.
  2. Pick a Layout: Grid, One row or One column. For a grid, set the Columns. It starts at a near square grid for your number of frames.
  3. To use only part of the animation, set From frame and To frame.
  4. Pick Keep every frame, or every 2nd, 3rd or 4th frame for a lighter sheet.
  5. Choose the Scale, from 25% to 400%, and the Padding in pixels between and around the frames.
  6. Pick Scaling: Smooth for photos and drawings, Sharp pixels for pixel art.
  7. Pick a Background: See-through, or A colour with the colour picker.
  8. Pick the JSON layout your engine reads: Hash, Array, or Grid sizes only.
  9. Watch the Playback box to check the result, then click Download the PNG, or PNG, JSON and CSS in a ZIP for all three. You can also download the JSON alone or Copy the CSS. Your settings are kept in this browser for next time.

How the grid is worked out

Frames fill the grid left to right, then top to bottom. The padding goes between the frames and around the outside edge too. So the sheet width is the columns times the frame width, plus the padding once more than the number of columns. The height works the same way with rows.

Take a GIF of 24 frames, each 64 by 64 pixels. The tool starts at 5 columns, because 5 is the square root of 24 rounded up. That needs 5 rows, so the sheet is 320 by 320 with one empty cell at the end. Set 6 columns instead and you get 4 full rows, a sheet of 384 by 256 with no gaps. Add 2 pixels of padding to that and the width becomes 6 times 64 plus 7 times 2, which is 398, and the height 4 times 64 plus 5 times 2, which is 266.

ColumnsRowsPaddingSheet sizeEmpty cells
550320 by 3201
640384 by 2560
642398 by 2660
24101536 by 640

To find one frame by hand, its left edge is the padding plus its column times the frame width plus padding. In the 6 column sheet with 2 pixels of padding, the 10th frame sits in column 3 and row 1, counting from 0. That puts it at 2 plus 3 times 66, which is 200, and 2 plus 1 times 66, which is 68. The JSON file lists these numbers for every frame so you do not have to.

What each setting is for

  • Padding. A gap stops the edge of one frame showing up on the next when a game engine scales or filters the sheet. 1 or 2 pixels is often enough. The CSS works with or without it.
  • Keep every. Every 2nd frame halves the frame count. Each kept frame also takes the time of the frame dropped after it, so the animation runs at the same pace, only less smoothly.
  • From frame and To frame. Cut a long GIF down to one move, such as frames 1 to 8 of a run cycle, without editing the GIF first.
  • Scale and Sharp pixels. For pixel art, use 200% or 400% with Sharp pixels so each pixel becomes a clean block instead of a blur.
  • Background. See-through is right for most engines. A solid colour, magenta to start, is for older tools that treat one colour as transparent.

The page warns you when the sheet is wider or taller than 4096 pixels, because some game engines and phones refuse textures that big. More rows, a smaller scale or fewer frames bring it back under.

Using the files

The JSON starts in the hash layout: each frame has a name made from your file name, such as run-000 for run.gif, a frame box with x, y, w and h, and a duration in milliseconds. The array layout holds the same boxes as a list, each with a filename, which is what some loaders expect. In Phaser 3 you can load the PNG and JSON together as an atlas in either layout. Engines that cut a sheet by a fixed grid instead want the frame width, frame height, and the padding as both margin and spacing, and Grid sizes only gives just those numbers with the frame times.

The CSS sets a box the size of one frame and moves the background from cell to cell. With one row and no padding it uses a single steps() slide, which gives every frame the same time. Otherwise it lists a keyframe for each frame, placed by that frame's own time, so a GIF with uneven frame times keeps its rhythm on the page. Save the PNG with the name in the CSS, or change the url() to match.

Need frames from a clip first? Use extract frames from video. To save the frames of a GIF as separate pictures instead of one sheet, try GIF to PNG.

Questions

Good to know.

What is a sprite sheet?

One picture holding every frame of an animation in a grid. Games and websites load it once and show one frame at a time, which is faster than many separate pictures.

How many columns should I use?

A square-ish grid keeps the sheet small. Many engines prefer sheets no wider or taller than 4096 pixels, and the page warns you past that.

Can I use separate frame pictures?

Yes. Choose or drop several PNGs at once; they are sorted by name, so frame-1, frame-2 and frame-10 land in order.

Does it keep transparency?

Yes. See-through parts of the GIF or PNG stay see-through in the sheet.

Is the GIF uploaded?

No. Everything happens in your browser.

Does the CSS animation keep each frame's time?

Yes, when the sheet has padding or more than one row: each keyframe starts at its frame's own time. A single row with no padding uses one steps() slide, which gives every frame the same time. The JSON always keeps each frame's own duration.

Can I use only part of a GIF?

Yes. Set From frame and To frame, and only those frames go in the sheet, the JSON and the CSS.

What does padding do?

It adds empty pixels between the frames and around the sheet. That stops a sliver of one frame bleeding into the next when an engine scales the picture.

How long does each frame last when I use separate pictures?

100 milliseconds each, which is 10 frames a second. Change the durations in the JSON, or the time in the CSS, if you want a different pace.

My frames are different sizes. What happens?

Every cell takes the size of the largest frame, and smaller frames are centred inside their cell, so the animation does not jump around.

Can I use the sheet in Phaser, PixiJS or another game engine?

Yes. Under JSON format, Hash and Array are frame lists for tools such as Phaser, PixiJS and TexturePacker. Grid sizes only gives the frame width and height, margin, spacing and each frame's time, for any engine that slices a sheet by a fixed frame size.

Can I make a sheet of an exact size, such as 1024 by 1024?

There is no box for an exact sheet size. The size comes from the frame size, Columns, Scale (25%, 50%, 100%, 200% or 400%) and Padding, and the page shows the sheet size in pixels, so try other columns and scales until it fits.

Why does it wrap my row into several rows?

A browser cannot draw a picture wider or taller than 16,384 pixels, so a row of 300 frames cannot be saved as one line. The sheet is wrapped into as many rows as it needs, and the JSON and the CSS list the real place of every frame. If the sheet would still be too big, the tool says so and turns the downloads off until you lower the scale or keep fewer frames.

Are the CSS times right when my frames have different times?

Yes. When every frame has the same time the CSS uses a simple steps animation. When the times differ, it writes one keyframe per frame at the right percentage, so a slow frame stays on screen longer.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch