Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Image Processing
  3. Sprite Sheet Generator
Add to favorites

Sprite Sheet Generator

Pack frames into a sheet with an atlas that names each sprite's own rectangle, or slice a sheet back apart with margin and spacing read off the pixels. The page checks every frame comes back out of the sheet byte for byte.

Edits stay in your browserMore image processingJump to full guide

Initializing in your browser…

You might also like

Texture Generator

Twelve procedural patterns that tile exactly, verified live with a measured wrap error and a 3 by 3 repeat view. Perlin, fractal, ridged, Voronoi, marble, wood and geometric grids.

Meme Generator

Caption a picture with text that is measured, wrapped and kept inside the frame. The preview canvas is the exported file, pixel for pixel.

Chord Diagram Generator

Chord diagrams whose fingerings are found by searching the fretboard, so the notes under the dots really are the chord's. Ten tunings, sixteen qualities, and the notes named on the page.

Sprite Sheet Generator: a worked example

Eight 32 px frames packed with 4 px of padding, then sliced back out of the sheet the same tool just wrote.

Input

sprite-0.png .. sprite-7.png · 4 columns · 4 px padding
What Sprite Sheet Generator produces

Frames that came back unchanged

                              before      after
no padding                    8 of 8      8 of 8
4 px padding                  0 of 8      8 of 8
a 25 px frame in a 32 cell    (67.5)      (68)
its atlas rectangle           32 x 32     25 x 25

The slicer computed its frame size as floor(sheetWidth / columns), so a sheet packed with 4 px of padding sliced into 35 by 34 frames and not one frame survived. Two smaller faults sat beside it: a 25 px frame centred in a 32 px cell landed on a half pixel, where drawImage resamples, and the atlas reported the CELL rather than the sprite, so an engine drew it three and a half pixels off centre.

About the Sprite Sheet Generator

Pack frames into one sheet with a TexturePacker, JSON array or CSS atlas, or slice an existing sheet back into frames. Every frame is placed on a whole pixel, the atlas names each sprite's own rectangle, and the page cuts every frame back out of the sheet it just packed to prove it comes back unchanged.

How to use

  1. 1Upload the frames in Generate mode and reorder them into animation order
  2. 2Choose a uniform grid or packed rows, then set columns, padding and margin
  3. 3Generate, and read the verdict: every frame cut back out and compared with the file that went in
  4. 4Download the PNG and the atlas in TexturePacker hash, JSON array or CSS form
  5. 5Or switch to Slice mode, upload a sheet, and let the margin, spacing and frame size be read off it

Key features

  • A round-trip check on the page: every frame cut back out of the sheet and compared byte for byte
  • Whole-pixel placement, so no frame is resampled on the way in
  • An atlas that names the sprite's own rectangle, with sourceSize, spriteSourceSize, rotated and trimmed
  • TexturePacker JSON Hash, JSON Array and CSS output from one plan
  • Duplicate frame names numbered instead of silently overwriting each other
  • Margin and spacing in both directions, so a padded sheet can be sliced back
  • The slice grid read off the sheet, with the ambiguous case named rather than guessed
  • The grid drawn over the source at the sheet's own coordinates, with off-sheet rectangles in red
  • Uniform grid or packed rows, power-of-two rounding, and a magenta debug background

Tips & best practices

  • Read the green verdict after generating. It means every frame was cut back out of the sheet at the atlas rectangle and matched the file that went in, which is the only test a packer can really be given.
  • Set Background to Magenta (debug) to catch stray edge pixels, then re-export with Transparent for production. The round-trip check knows about the background and compares the composited result.
  • In Slice mode the grid is read off the sheet when you upload it. Where the frames have transparent edges, the page says the frame-against-gap split is not decidable from pixels and you can correct it.
  • Choose Top left of cell alignment if you never want a frame moved: centring an odd size difference lands on a half pixel and has to be rounded.
  • Power of two rounds the sheet up for a GPU texture, and the plan says what it grew from.

Examples

  • Pack a walk cycle into a sheet

    Upload the frames, reorder them so they play in sequence, set Columns to your frames per row and a few pixels of padding, then download the PNG plus the JSON Hash atlas. The verdict above the preview says all frames come back from the sheet byte for byte.

  • Read a sheet you did not pack

    Switch to Slice mode and upload the sheet. The margin, spacing and frame size are read off the separating rows and columns, the grid is drawn over the image, and any rectangle that runs off the sheet is red.

How it works

A sprite sheet packer carries its own reference inside it: pack the frames, slice the sheet back, and every frame must come back byte for byte. This page runs that check on itself. After it packs, it cuts each frame back out of the sheet at exactly the rectangle its atlas names, compares it with the file that went in, and prints the verdict above the preview. Three things have to be right for that to pass, and all three were wrong before.

First, every frame is placed on a WHOLE pixel. Centring a 25 pixel sprite in a 32 pixel cell puts it at 3.5, and `drawImage` at a half pixel resamples: the frame comes out blurred and is no longer the file that went in. Offsets are rounded here, and the page says how many frames needed it. You can also switch the alignment to the cell's top left, where nothing ever needs rounding.

Second, the atlas names the SPRITE, not the cell. The old metadata reported x 64, y 64, w 32, h 32 for a 25 by 25 sprite drawn at (67.5, 67.5), so a game engine reading the atlas drew it three and a half pixels off centre with 399 pixels of empty cell attached to it. Every entry now carries the sprite's own rectangle plus the TexturePacker fields a real atlas has: `sourceSize`, `spriteSourceSize`, `rotated` and `trimmed`. Three formats are written from one plan: TexturePacker JSON Hash (which Phaser 3 and PixiJS both read), JSON Array, and CSS with a class and a background-position per frame. Two files with the same name no longer overwrite each other in the atlas: the names are made unique and the page says how many collided.

Third, a sheet with padding can be sliced. The old slicer had no padding, margin or spacing control at all and computed its frame size as floor(sheetWidth / columns), so a sheet this same tool had just packed with 4 px of padding sliced into 35 by 34 frames and 0 of 8 came back. Slice mode now takes margin and spacing, and reads them off the sheet for you: it finds the separating rows and columns, measures the STRIDE from where each frame's content starts, and fills the grid in. Where the frames have transparent edges of their own, the split between frame and gap genuinely cannot be read off the pixels (a 32 px frame with a 4 px transparent border looks exactly like a 28 px frame with 4 px more padding), and the page says so rather than guessing. The grid that will actually be cut is drawn over the source image at the sheet's own coordinates, with any rectangle that runs off the sheet in red, and the leftover on each axis is stated in pixels.

Packing offers a uniform grid, where every cell is the largest frame, and packed rows, where each row is only as tall as its own tallest frame. There is a margin around the sheet as well as padding between cells, an option to round the sheet up to a power of two for a GPU texture, and the classic magenta debug background. Everything runs in the browser canvas; nothing is uploaded.

Frequently asked questions

What does the round-trip verdict mean?

After packing, the page cuts each frame back out of the sheet at exactly the rectangle the atlas names and compares it with the file that went in. All frames unchanged means the sheet and the atlas agree with the sources; anything else names the frame and the number of pixels.

Why did my sprite look off centre in my game engine?

Because an atlas that reports the CELL rather than the sprite puts the sprite wherever it happens to sit inside that cell. The entries here are the sprite's own rectangle, so a 25 by 25 sprite reads as 25 by 25 at the exact pixel it was drawn.

Can I slice a sheet that has padding between the frames?

Yes. Enter it as Spacing, and the margin around the sheet as Margin. Uploading a sheet reads both off the separating rows and columns for you.

The detected frame size is a little smaller than I expected. Why?

Because your frames have transparent edges of their own, and no reading of the pixels can separate a 32 px frame with a 4 px transparent border from a 28 px frame with 4 px more padding. The stride, which is the frame plus the gap, is always right, so the frames are cut in the right places; adjust the frame size if you want the empty border included.

Why use sprite sheets?

Combining many small images into one file reduces the number of HTTP requests and lets a GPU keep one texture bound, which is why every 2D engine wants one.

What image sizes work best?

Consistent sizes work best on the uniform grid, because every cell is the size of the largest frame. Packed rows waste less on mixed sizes. Either way the atlas records each sprite's real rectangle.

Private by design

Images are decoded, edited, and exported entirely inside this browser tab. No originals, exports, or metadata are uploaded.