Skip to main content

Sprite sheet splitter & packer

Cut one sheet along a grid into frames named name_000.png, or go the other way and pack many frames into a single sheet. The grid is drawn over the sheet so you can check it before exporting.

Files are processed only inside this browser and are never sent to a server.

Accepts PNG, GIF, WebP and BMP. For animated GIFs only the first frame is used.

Drag and drop images here

Click to choose files · or paste with Ctrl+V

One image at a time · up to 50 MB · files never leave this browser

Choose one sheet image. If you pick several, only the first is used.

Grid

Divide by

Split: sheet to frames

  1. On the Split tab, add one sheet image.
  2. Choose how to divide it. If you know each cell is, say, 32×32 px, use Cell size; if you know it is 4 columns by 2 rows, use Columns × rows.
  3. If the sheet has empty space around its edge or between cells, enter the margin and spacing. The grid is drawn over the preview, so if the lines do not match the drawing, adjust the values.
  4. Check frame order and speed in the animation preview, then press Download as ZIP. Files are numbered with three digits, such as slime_000.png, slime_001.png …, with more digits once there are over 1,000 frames.

Margin, spacing and cell size

Most confusion when splitting a sheet comes from the empty space. The terms here match the tileset settings of the Tiled map editor; the Tiled documentation says image-based tilesets support "a margin around the tiles and a spacing between the tiles".

  • Margin: the empty border between the sheet edge and the first cell
  • Spacing: the empty gap between neighbouring cells
  • Cell: the rectangle that holds one frame

Below is a 78×42 px sheet with seven slime frames drawn for this article, laid out with a 4 px margin, 2 px spacing and 16×16 cells. The eighth cell was left empty on purpose.

The 78×42 px sheet magnified 7× as a diagram. The outer 4 px band (orange) is the margin, the 2 px bands between cells (blue) are the spacing, green outlines mark the 16×16 cells holding slime frames 000 to 006, and the last cell, 007, is transparent and marked with an X as skipped

With cell size, the maths is straightforward: the first cell's top-left corner is at (margin, margin), and each next cell sits cell size + spacing further along. Entering 16×16 cells, margin 4 and spacing 2 for the sheet above gives 4 columns by 2 rows, with 4 px left over on the right and bottom. When the leftover equals the margin, the sheet simply has the same border on all four sides. When it does not, the cell size or margin is probably wrong, and the tool says so.

With columns × rows, the margin is assumed on all four sides and the remaining width is divided by the column count. If it does not divide evenly, the cell size is rounded down and the leftover pixels are reported. If the resulting cell size looks odd, splitting by cell size is usually more accurate.

Skipping transparent cells

The last row of a sheet is often only partly filled. With Skip fully transparent cells on, cells whose alpha is zero everywhere are not exported, and numbering continues without them. In the example above, cell 7 is dropped and seven files from _000 to _006 come out. A cell with even one pixel of alpha 1, such as a very faint shadow, is not treated as empty.

Pack: frames to a sheet

  1. On the Pack tab, add several frame images. They fill the sheet from the top left in list order. Use the arrows to reorder, or Sort by name, which puts walk_2 before walk_10.
  2. Set the column count or turn on Automatic columns, which picks the count that makes the sheet's longest side as short as possible.
  3. Choose an arrangement. Equal cells sizes every cell to the largest frame and centres smaller frames, so an engine's grid slicer can split the sheet again, which suits animation. Packed rows places frames at their own widths, which is tighter but needs the JSON coordinates to slice.
  4. Download the PNG and JSON as a ZIP. The JSON is a plain format, with a frames array of names and x, y, w, h values and a size object for the sheet, so it is easy to read with your own code.

A sheet packed with equal cells splits back into the original frames when the Split tab is given the same cell size and the padding value for both margin and spacing. That round trip is covered by a unit test.

For slicing on the engine side, see each engine's documentation. Unity's Sprite Editor offers Grid By Cell Size and Grid By Cell Count slicing, and Godot's 2D sprite animation page covers Hframes and Vframes on Sprite2D and "Add frames from a Sprite Sheet" for AnimatedSprite2D.

Why padding: texture bleeding

If frames touch each other with no gap, colour from a neighbouring frame can show up along the edge when the sheet is drawn. With smooth (linear) texture sampling, the colour of an edge pixel also mixes in the texel right next to it, and if that texel belongs to another frame, its colour leaks in. Mipmaps and cameras zoomed by non-integer amounts can cause something similar.

To check this, three 16×16 tiles (grass, water, brick) were drawn for this article and packed with padding 0 and with 2 px. Each whole sheet was then enlarged 2.5× with sharp's linear interpolation, and the middle water tile was cropped out.

Grass, water and brick tile sheets packed with 0 px and 2 px padding, and the middle water tile from each drawn at 2.5× with smoothing. With padding 0 a teal stripe appears on the water tile's left edge where grass green mixed in; with padding 2 the edge only fades towards transparent and no other tile's colour mixes in

The water tile's base colour is RGB (30, 136, 229). In the padding-0 sheet, the middle pixel on the left edge of the crop came out as (95, 178, 173), a teal mixed with the neighbouring grass. In the padding-2 sheet the same pixel only dropped to alpha 127, half transparent, with no green mixed in.

Padding keeps other frames' colours out, but as shown, it does not stop edges fading towards transparent. That is why some pipelines extrude, copying the edge pixels outwards by a pixel or two; the Tiled documentation mentions margin and spacing being used for tilesets with extruded border pixels to avoid colour bleeding. This tool only adds transparent padding. For pixel art, setting the texture filter to nearest (Point, Nearest) is the most reliable fix; those settings are covered on the pixel art upscaler page. How many pixels are enough depends on mipmap levels and engine settings, so check in the actual game view.

Good to know

  • Accepts PNG, GIF, WebP and BMP. Only the first frame of an animated GIF is read.
  • Up to 4,096 cells can be split, and a packed sheet can be up to 16,384 px on a side.
  • To bring differently sized images to one size first, see making game images a consistent size.
  • The site is run by a solo game developer. Sheets and frames are processed only inside your browser and are never sent to a server.

This page was last updated on 2026-11-21

Other tools