IT Image Tools

Sprite Sheet Generator — PNG + JSON + CSS

Combine multiple images into one sprite sheet PNG with JSON and CSS coordinates. Grid or packed layout, padding control — free and fully in your browser.

🔒 Runs entirely in your browser — nothing is uploaded

Drop images here or click to browse (PNG, JPG, WebP, GIF, SVG)

CSS preview
Advertisement

What a sprite sheet is and why it helps

A sprite sheet packs many small images — animation frames, game tiles, UI icons, emoji or flags — into a single larger image. Loading one file instead of dozens reduces HTTP requests and texture switches, which makes web pages and games load and render faster. Each individual sprite is then shown by referring to its rectangle inside the sheet. This sprite sheet generator builds the image and the coordinates for you: drop your files, choose a layout and download a PNG together with a JSON data file and a ready-to-use CSS stylesheet.

All work happens in your browser. The images are drawn onto a canvas locally and the coordinate files are generated in JavaScript, so your artwork is never uploaded and there is no limit on how often you regenerate the sheet while you experiment with settings.

Grid or packed layout

The uniform grid gives every sprite a cell as large as the biggest image and centres each sprite inside its cell. That predictable structure is what most animation systems expect: frame n is always at column n modulo the column count. Packed rows sorts sprites by height and fills rows up to a target width, which wastes far less space when your images have different sizes. In both modes the padding value adds transparent space around every sprite to avoid color bleeding when the sheet is scaled.

Using the JSON and CSS output

The JSON file lists every sprite by a clean name derived from its file name, with its x and y position, width and height, plus the overall sheet size. Game frameworks such as Phaser and PixiJS can load this hash format directly, and it is easy to parse in any language. The CSS file defines a base class that sets the sheet as a background image and one class per sprite with its size and background position, so an icon is just a span with two classes. Change the class prefix to match your project's naming, and keep the PNG next to the CSS file or adjust the URL.

How to use

  1. Add imagesDrop the individual sprites or icons; they are added in the order you drop them.
  2. Choose a layoutPick a uniform grid with a number of columns, or packed rows, and set the padding.
  3. Check the previewReview the sheet and remove any image by clicking its name.
  4. DownloadSave the PNG sheet plus the JSON and CSS coordinate files.

Frequently asked questions

Are my images uploaded to build the sprite sheet?
No. The images are drawn onto a canvas in your browser and the PNG, JSON and CSS files are generated locally. Nothing is uploaded.
Should I use a uniform grid or packed rows?
Use the uniform grid for animation frames and game engines that expect equal cells. Use packed rows for icons of different sizes when you want the smallest possible sheet.
What JSON format is exported?
A TexturePacker-style hash: a frames object keyed by sprite name, each with frame x, y, w, h and sourceSize, plus meta with the image name and sheet size. Many engines such as Phaser and PixiJS can read it.
Why add padding between sprites?
A gap of 1–2 pixels prevents neighbouring sprites from bleeding into each other when the sheet is scaled or filtered by a browser or GPU.
Advertisement