About the Sprite Sheet Generator tool
A sprite sheet packs many small images into one file. Websites use CSS sprites to load a whole icon set in a single request, and game engines such as Phaser, PixiJS and Unity read sprite sheets with a JSON map of frame positions. This generator builds the sheet and the coordinate files for you from any set of PNG, JPG, WebP or GIF images.
Drop your icons or animation frames and choose a layout. Packed uses shelf packing that sorts images by height and fills rows to keep the sheet compact. Grid puts every image in an equal cell, which suits animation frames that engines slice by cell size. Row and Column produce a single horizontal or vertical strip. Padding adds transparent space around each image to prevent neighbouring pixels bleeding in when scaled.
The tool writes CSS classes named after your file names, each with width, height and background-position, plus a JSON file in the widely used TexturePacker hash format with x, y, w and h for every frame. Copy either output, download it separately, or grab the PNG, CSS and JSON together in one ZIP.
How to use Sprite Sheet Generator
- Drop the images you want in the sprite; file names become the CSS class and frame names.
- Choose a Layout: Packed, Grid, Row or Column (set Columns for Grid).
- Set the “Padding between images” and a “CSS class prefix”.
- Check the preview and the CSS and JSON tabs below it.
- Click “Download sprite PNG”, or “Download PNG + CSS + JSON (ZIP)” for everything.
Features
Four layouts
Compact shelf packing, uniform grid cells, a single row or a single column.
Ready-to-use CSS
One base class plus a class per image with its exact size and background-position.
JSON frame data
TexturePacker-style hash JSON with frame rectangles and sheet size for game engines.
Padding control
Add 0 to 32 px of transparent spacing to avoid texture bleeding.
Lossless PNG output
The sheet is saved as a transparent PNG with every image at its original pixel size.
When to use it
- Combining a website’s social and UI icons into one CSS sprite to cut HTTP requests.
- Packing character animation frames into a sheet for a Phaser or PixiJS game.
- Building a uniform grid sheet of walk-cycle frames for a Unity or Godot sprite animation.
- Creating an emoji or badge sheet for an email template or a legacy site.
- Preparing a texture atlas for a game jam without installing desktop tools.
Frequently asked questions
How do I use the CSS output?
Add the base class and the image’s class to an element, for example <span class="icon icon-home"></span>, and upload the PNG next to your stylesheet using the file name shown in the CSS.
Which JSON format is generated?
A hash format with a frames object keyed by name, each holding frame {x, y, w, h}, plus meta.size. It matches TexturePacker’s JSON (Hash) layout that Phaser and PixiJS load directly.
Are images trimmed or rotated to save space?
No. Images are placed as they are, unrotated and untrimmed, so the coordinates always match your original files.
Should I use Packed or Grid?
Packed gives the smallest sheet for icons of mixed sizes. Grid is better for animation frames because every frame sits in an identical cell.
Can I make a retina (2×) sprite?
Supply icons exported at double size and set background-size in your CSS to half the sheet dimensions shown in the comment at the top of the CSS.