Make a sprite sheet from images
Put separate pictures on one sprite sheet, with JSON for game engines.
Free, no sign-up, no credit card. Your files stay on your device.
Uses libheif under the GNU LGPL (licence).
How to make a sprite sheet from images
- Choose the pictures, or drop them on the page, and put them in order.
- Pick a grid of equal cells or a packed sheet, and set the padding.
- Select "Make sprite sheet".
- Download the PNG, the JSON, and the CSS, or all three as a zip.
What to know
The files you get
- sprite-sheet.png: every picture at its own pixels, never scaled or smoothed.
- sprite-sheet.json: the JSON Hash format TexturePacker writes, with each frame's place, whether it was trimmed, and its original size. Phaser and PixiJS read it as it is.
- sprite-sheet.css: a class per picture, such as .sprite-walk-1, for using the sheet on a web page. A trimmed picture shows without its clear edges.
Sizes and limits
- Up to 500 pictures on one sheet, and up to 16,384 pixels each way.
- Many phones can't load a picture over 4096 pixels wide or tall; the result says when a sheet is bigger than that.
- Power-of-two size rounds the sheet up to 256, 512, 1024, and so on, which older graphics chips and some engines need.
- Padding adds clear pixels between pictures and around the edge, which stops neighbouring frames bleeding in when a game scales them.
If something goes wrong
Frames in my game show slivers of their neighbours
The game smooths the sheet as it scales it. Add 2 pixels of padding, or turn smoothing off in the engine for pixel art.
The animation jumps around in a grid
The pictures are different sizes, and each sits at the top left of its cell. Make them all the same size first, or use a packed sheet with its JSON. Use Resize image.
The frames are in the wrong order
Pictures go on the sheet in the order listed. Use "Move up" and "Move down" before making the sheet, or name the files in order, such as walk-1 to walk-8, and choose them together.
Questions
How do I use the sheet in Phaser?
Load the PNG and the JSON together as an atlas: this.load.atlas('player', 'sprite-sheet.png', 'sprite-sheet.json'). Each frame is named after its picture's file name, such as walk-1.png.
How do I use it in PixiJS?
Load the JSON with Assets.load('sprite-sheet.json'); PixiJS finds the PNG named inside it. The JSON also lists every frame in order under the animation sprite-sheet, for an AnimatedSprite.
Grid or packed?
A grid gives every picture the same cell, so a game can step through frames by their size, with no data file needed. Packed fits pictures of different sizes into the smallest sheet, and the JSON says where each one is.
What does trimming do?
In a packed sheet, see-through edges around each picture are left out, so the sheet is smaller. The JSON records how much was cut, so Phaser and PixiJS draw each frame in its original place.
Can I make a sheet from a GIF?
Use GIF to PNG and choose "One sprite sheet". It lays out the GIF's frames in a grid.
Are my pictures uploaded?
No. Your files are processed on your device. We never upload them.
You might also need
-
GIF to PNG frames
Every frame of a GIF as a PNG, or all of them on one sprite sheet. -
Image to pixel art
Turn a photo into blocky pixel art with a few colours. -
Combine images
Join images side by side or one above another, as one picture. -
Image splitter
Cut a picture into tiles, an Instagram grid, or carousel slides. -
Resize image
Change image dimensions by pixels or percent, many images at once.