Skip to content
Jellykit

Sprite Sheet Generator

Pack icons or animation frames into one PNG sprite sheet, with matching CSS classes and a JSON frame map.

  • Runs on your device
  • Works in the background
Loading tool

About Sprite Sheet Generator

Combine many small images into a single sheet so a page or a game loads one file instead of dozens. Drop in icons or animation frames and choose how to arrange them: packed tightly with the MaxRects algorithm for the smallest sheet, or in a row, a column or a grid of equal cells that keeps your order for animations.

You get three files: the PNG sheet, a stylesheet with one class per image (width, height and background position already worked out), and a JSON map of every frame in the hash layout that most game engines and sprite tools read. Padding between images and power-of-two sheet sizes are one click away.

How it works

  1. Each image is opened by your browser at its own size; nothing is scaled. An SVG is drawn at the size it declares.
  2. The layout is worked out in the background. Packed mode tries a range of sheet widths with the MaxRects algorithm (best short side fit, no rotation) and keeps the smallest sheet; row, column and grid keep the order of the list.
  3. The images are drawn onto one canvas at their positions and saved as PNG, so transparency is kept. The CSS and JSON are written from the same positions, so they always match the sheet.

Questions

How large can the sheet be?

4096 × 4096 pixels, the largest canvas every browser, including Safari on iPhone and iPad, can draw. If your images need more, the tool says how large the sheet would be so you can use fewer images or less padding. Up to 500 images at once.

How do I use the CSS?

Put the PNG next to the stylesheet and give an element both the shared class and the image’s own class, for example class="sprite sprite-home". Class names come from the file names, made lower case and safe for CSS; duplicates get -2, -3 and so on.

Are images rotated or trimmed to save space?

No. Every image keeps its orientation and its transparent edges, so the positions in the CSS and JSON are simply where each original image sits on the sheet.

Which layout should I choose for an animation?

Grid or row. Both keep the order of the list, which you can change by dragging, and a grid puts every frame in an equal cell, which is what many animation players expect.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.