3BearLabs3Bear Tools
Images

Sprite Normalizer: Repack Sprite Sheets

Turn an uneven sprite sheet into a uniform grid, with a JSON file describing each frame.

Runs in your browser — files never leave this device.

How to use

  1. Load a sprite sheet with a transparent background.
  2. Wait for sprite detection to finish, then check the sprite count, grid size and cell size shown above the previews.
  3. Compare the original with the repacked sheet, then download the PNG and the JSON file.

Sprite sheets drawn or exported by hand often have frames of different sizes at uneven spacing, which makes them awkward to slice. This tool finds each sprite using the alpha channel, so it needs a transparent background to work. A pixel counts as part of a sprite when its alpha is above a small threshold. The sheet is scanned for rows of sprites, then for sprites within each row, and tiny stray pieces are filtered out when their area is much smaller than the typical sprite.

The sprites are then copied into a grid of equal cells. The grid is roughly square in layout, with the cell width and height set to the largest sprite found. Each sprite is placed at the left of its cell and centered vertically. The tool shows how many sprites it found, the grid as columns by rows, and the cell size in pixels, alongside the original and repacked images.

You get two downloads. The PNG is the repacked sheet. The JSON file lists every frame by name with its position and size in the new sheet, the source size, the offset of the sprite inside its cell, and a pivot of 0 and 0.5. The names are built from your file name plus a three-digit index.

If nothing is detected, the page tells you to use an image with a transparent background. Detection and repacking happen in your browser, and the image is not uploaded.

FAQ

Why were no sprites detected?

The detection relies on transparency. If your sheet has a solid background, remove it first, for example with the background remover.

In what order are the sprites packed?

In reading order: row by row from the top, and left to right within each row.

What goes in the JSON file?

A frames object with each frame's rectangle, source size, sprite offset and pivot, plus a small meta section.

Are the sprites resized?

No. Each sprite keeps its pixel size. Only the spacing and position change.

Is the sheet uploaded anywhere?

No. Everything runs in your browser.

Related tools