ITFree Image Toolkit

Free Image Toolkit

Sprite Sheet Maker

Combine PNG frames into a sprite sheet with pixel spacing, metadata, and animation preview.

No sign-up or payment is required, and files are processed in your browser whenever possible.

Upload images

Click or drop files here

Large images may slow down your browser.

Sprite sheets are generated with browser canvas. Very large canvases may hit browser limits.

Estimated canvas size: auto after upload / Columns: 4 / Rows: -

Frame spacing is the gap between frames. Use 0px when you want a tightly packed sheet for automatic slicing, or 2-4px when you want the sheet to be easier to inspect visually.

The recommended unit is px. Sprite sheets depend on exact pixel coordinates, so px is more suitable than %, rem, or other relative units.

  • - 0px: tightly packed sheets for game engines or automatic slicing
  • - 1-2px: helps pixel art frames avoid touching visually
  • - 4px: comfortable spacing for preview and editing
  • - 8px or more: documentation and human-readable sprite sheets

Animation Preview

Rows can represent directions such as down, up, left, and right, but the meaning depends on your own sprite layout.

Frame coordinate guide

  1. 1.A sprite sheet plays animation by drawing one rectangular frame from a larger image.
  2. 2.frameX and frameY mean where a frame starts inside the sheet.
  3. 3.frameWidth and frameHeight are the size of one frame.
  4. 4.Frame spacing is the gap between frames, cell padding is the inner space around an image, and outer margin is the space around the full sheet.
  5. 5.The metadata JSON can be used by a game engine or custom renderer to read exact frame coordinates.

JavaScript Example

const image = new Image();
image.src = "spritesheet.png";
const canvas = document.querySelector("canvas");
const ctx = canvas.getContext("2d");
ctx.imageSmoothingEnabled = false;
const frameWidth = 32;
const frameHeight = 32;
const columns = 4;
const frameSpacing = 2;
const cellPadding = 0;
const outerMargin = 0;
let frame = 0;
let last = 0;
function drawFrame(index) {
  const col = index % columns;
  const row = Math.floor(index / columns);
  const sx = outerMargin + col * (frameWidth + cellPadding * 2 + frameSpacing) + cellPadding;
  const sy = outerMargin + row * (frameHeight + cellPadding * 2 + frameSpacing) + cellPadding;
  ctx.clearRect(0, 0, canvas.width, canvas.height);
  ctx.drawImage(image, sx, sy, frameWidth, frameHeight, 0, 0, frameWidth, frameHeight);
}
function loop(time) {
  if (time - last > 125) {
    drawFrame(frame);
    frame = (frame + 1) % 1;
    last = time;
  }
  requestAnimationFrame(loop);
}
image.onload = () => requestAnimationFrame(loop);

CSS Animation Example

The CSS steps example is simplest for a single-row sprite sheet with 0px spacing. For multiple rows or spacing, the JavaScript example is more flexible.

.sprite {
  width: 32px;
  height: 32px;
  background-image: url("spritesheet.png");
  animation: play 0.13s steps(1) infinite;
}
@keyframes play {
  from { background-position: 0 0; }
  to { background-position: -32px 0; }
}

Unity import tips

  • - Texture Type = Sprite (2D and UI)
  • - Sprite Mode = Multiple
  • - For pixel art, Filter Mode = Point
  • - Compression = None is recommended
  • - Use Slice in Sprite Editor
  • - A consistent cell size makes automatic slicing easier
  • - Set Pivot around the character center or feet depending on your game
  • - 0px frame spacing is simplest for automatic slicing
  • - If spacing is used, match Grid By Cell Size offset and spacing in Unity Sprite Editor

Need a GIF file?

Turn frame animations into GIFs with the GIF Maker.

Open GIF Maker

How to use

  1. 1.Upload a file or enter the needed values.
  2. 2.Adjust the available options.
  3. 3.Preview the result in your browser.
  4. 4.Copy or download the final result.

Cautions

  1. 1.Processing time can vary by browser and device performance.
  2. 2.This tool focuses on sprite sheets for game assets. Use GIF Maker when you want to save frame animation as a GIF.
  3. 3.Check the preview before downloading the result.

FAQ

Are files stored on a server?

Files are processed in your browser whenever possible and are not stored on a server.

Can I use large files?

This tool focuses on sprite sheets for game assets. Use GIF Maker when you want to save frame animation as a GIF.

Related tools

GIF Maker

Create GIFs from image frames or sprite sheets with FPS, size, preview, and download controls.

GIFAnimation
Open tool

GIF Frame Extractor

Extract GIF frames as PNG images and download individual frames or a ZIP.

Extract
Open tool

Video Frame Extractor

Select the exact moment you want from a video and save it as a clear PNG image. Extract frames directly in your browser for thumbnails, presentations, scene references, or study materials.

Extract
Open tool