Home / Guides / Make a sprite sheet with AI for free

How to make a sprite sheet with AI for free

Short answer: pick one frame size, make one base character, and let an AI tool animate that same character so the frames match. PixelLab, Retro Diffusion and SpriteCook all have a free way to start, and all three allow commercial use on that free allowance. Then line the frames up, pack them into one grid image with the free Python script below, and slice the grid in Godot (AnimatedSprite2D) or Unity (Sprite Editor).

Facts checked Oct 31, 2026 on the official sites: PixelLab's pricing table, FAQ and Terms of Service, Retro Diffusion's home page and FAQ, SpriteCook's pricing page, Aseprite's FAQ and sprite sheet docs, LibreSprite's site, the Godot 4.7 docs and the Unity 6 manual. Free plans change, so check again before you rely on a limit. The packing script was tested on Python 3.13 with Pillow 13.0.0, and the sheet it made was imported and sliced into SpriteFrames in Godot 4.7.2 running headless. We did not test the Unity steps.

What a sprite sheet is, in 30 seconds

Step 1: Pick a frame size and a grid

Step 2: Generate consistent frames with a free plan

The hard part with AI is consistency. If you type a new prompt for every frame, you get a slightly different character each time. Instead, make one base character you like, then use the tool's animate feature on that same image so every frame starts from it.

ToolWhat is freeAnimationSheet export on free?Commercial use on free?
PixelLabFree trial: 40 fast generations, then 5 slower ones a day (store up to 20), images up to 200x200. No card. Map tools are not included.Basic animation from text descriptions on the trial. Paid tiers add skeleton animation.Unverified. The pricing table does not say.Yes. You own the copyright to your creations. Do not train other models on them.
Retro Diffusion$0.50 of balance for new accounts, no card: 16 RD Fast images or 2 RD Pro images. Then top up from $5, and the balance never expires.Animations from $0.07. Advanced Animations animate your own image, from $0.10 (most moves $0.14), 4 to 16 looping frames.Yes. Advanced Animations return a sprite sheet and GIF, with transparent backgrounds.Yes. Retro Diffusion says you own your outputs for personal and commercial projects.
SpriteCook40 credits every 30 days, no card. Images cost 8 to 12 credits, animations 20 to 26.Every model and mode, including animation, on Free.No. Free has PNG and ZIP downloads. Sprite sheet, Unity, Godot and Phaser exports start at Starter ($8 a month).Yes, with no credit required. Free generations appear in the public gallery.

The free allowances are small: about one or two SpriteCook animations a month, or a few Retro Diffusion Advanced Animations from the starting balance. Spend them on your main character's idle and walk, and use free CC0 art for everything else. A SpriteCook free ZIP of frames is exactly what the packing script in Step 4 turns into a sheet.

Tips that keep frames consistent:

Deciding between the two pixel art specialists? Read PixelLab vs Retro Diffusion, or see Best AI tools for pixel art for more options.

Step 3: Clean up and line up the frames

Expect to fix a few things by hand. That is normal with every AI sprite tool.

Already have a finished sheet? Retro Diffusion's Advanced Animations return one, so you can skip Step 4 and import it directly. Just count its columns and rows first. When not to trim: if your tool exported separate frames that are already lined up on the same canvas, run the script with --no-trim so it keeps each frame exactly as drawn. Trimming a frame where a sword sticks out can shift the body a little.

Step 4: Pack the frames into one sheet (free script)

Put your PNG frames in one folder, named in order (walk_1.png, walk_2.png and so on). This Python script, using the free Pillow library, sorts them in natural number order (so walk_10 comes after walk_9), trims empty transparent edges, gives every cell the size of the biggest frame, stands each frame bottom centered in its cell and saves one grid:

# Pack a folder of PNG frames into one sprite sheet grid.
# Run: python pack_sheet.py frames_folder sheet.png --columns 4
# Needs Pillow: python -m pip install pillow
import argparse, re
from pathlib import Path
from PIL import Image

p = argparse.ArgumentParser()
p.add_argument("folder")
p.add_argument("out")
p.add_argument("--columns", type=int, default=0, help="frames per row (default: all in one row)")
p.add_argument("--padding", type=int, default=0, help="empty pixels between cells")
p.add_argument("--no-trim", action="store_true", help="keep each frame exactly as drawn")
args = p.parse_args()

def natural(path):  # walk_2.png sorts before walk_10.png
    return [int(s) if s.isdigit() else s.lower() for s in re.split(r"(\d+)", path.name)]

files = sorted(Path(args.folder).glob("*.png"), key=natural)
if not files:
    raise SystemExit("No PNG files found in " + args.folder)

frames = []
for f in files:
    im = Image.open(f).convert("RGBA")
    if not args.no_trim:
        box = im.getchannel("A").getbbox()  # crop empty transparent edges
        if box:
            im = im.crop(box)
    frames.append(im)

# Every cell gets the size of the biggest frame, so all cells match
cell_w = max(im.width for im in frames)
cell_h = max(im.height for im in frames)
cols = args.columns or len(frames)
rows = -(-len(frames) // cols)  # round up
pad = args.padding
sheet = Image.new("RGBA", (cols * cell_w + (cols - 1) * pad, rows * cell_h + (rows - 1) * pad), (0, 0, 0, 0))

for i, im in enumerate(frames):
    x = (i % cols) * (cell_w + pad) + (cell_w - im.width) // 2  # centered left to right
    y = (i // cols) * (cell_h + pad) + (cell_h - im.height)      # feet on the cell floor
    sheet.paste(im, (x, y), im)

sheet.save(args.out)
print(f"{len(frames)} frames, cell {cell_w}x{cell_h}, {cols} columns x {rows} rows")
print(f"Sheet {sheet.width}x{sheet.height} saved to {args.out}")
print(f"Godot: Hframes {cols}, Vframes {rows}. Unity: Slice > Grid By Cell Size {cell_w} x {cell_h}")

Save it as pack_sheet.py, then run it:

python -m pip install pillow
python pack_sheet.py frames walk_sheet.png --columns 4

It prints the numbers you need for the engine:

7 frames, cell 21x38, 4 columns x 2 rows
Sheet 84x76 saved to walk_sheet.png
Godot: Hframes 4, Vframes 2. Unity: Slice > Grid By Cell Size 21 x 38

Tested Oct 31, 2026 on Python 3.13.5 with Pillow 13.0.0, on 7 test frames of different sizes (48x48 to 56x54) with the character drawn at a different offset in each, plus a walk_10.png to check the sort order. The script made an 84x76 sheet of 21x38 cells, every frame landed bottom aligned in its own cell, and walk_10 came last. --padding 2 and --no-trim also ran as expected. Leave --columns out to get a single row, which is fine for one short animation.

Step 5: Import the sheet into Godot 4

  1. Make pixel art sharp. In Project Settings, set Rendering > Textures > Canvas Textures > Default Texture Filter to Nearest. Godot's default is Linear, which blurs small sprites.
  2. Copy the sheet into your project folder.
  3. Add an AnimatedSprite2D node. In its SpriteFrames property, choose New SpriteFrames, then click it to open the SpriteFrames panel.
  4. Click Add frames from a Sprite Sheet and pick your sheet. Set the horizontal and vertical counts to the Hframes and Vframes the script printed (4 and 2 in our test).
  5. Select the frames for one animation and click Add. Rename the animation (for example "walk"), set the Speed (FPS), and press play in the panel to preview it.
  6. In code, call $AnimatedSprite2D.play("walk") to start it and stop() to stop it.

Those steps follow Godot 4.7's 2D sprite animation tutorial. The other documented way is a Sprite2D with the sheet as its Texture and Hframes and Vframes set in the Animation section of the Inspector, with an AnimationPlayer changing its Frame property.

Or build the SpriteFrames with a script

If you make many sheets, or want an AI coding agent to do it, this GDScript turns the sheet into a saved SpriteFrames resource with one animation, the same result as the panel steps:

# Run from your project folder: godot --headless --script res://make_frames.gd
# Turns res://sheet.png (4 columns, 2 rows, 7 frames) into res://walk_frames.tres
extends SceneTree

func _init():
	var sheet: Texture2D = load("res://sheet.png")
	var columns := 4
	var rows := 2
	var frame_count := 7
	var w := sheet.get_width() / columns
	var h := sheet.get_height() / rows
	var frames := SpriteFrames.new()
	frames.add_animation("walk")
	frames.set_animation_speed("walk", 10.0)
	for i in frame_count:
		var cell := AtlasTexture.new()
		cell.atlas = sheet
		cell.region = Rect2((i % columns) * w, (i / columns) * h, w, h)
		frames.add_frame("walk", cell)
	ResourceSaver.save(frames, "res://walk_frames.tres")
	print("Saved walk_frames.tres with ", frames.get_frame_count("walk"), " frames of ", w, "x", h)
	quit()

Tested Oct 31, 2026 on Godot 4.7.2 running headless, on the 84x76 sheet from Step 4: it saved walk_frames.tres with 7 frames of 21x38, the last frame's pixels matched cell 7 of the sheet exactly, and an AnimatedSprite2D loaded the file and played "walk" (looping is on by default). A Sprite2D with Hframes 4 and Vframes 2 showed frame 6 at column 2, row 1. We tested the script route, not the editor's sprite sheet window by hand. Change the numbers at the top to match your sheet. Want an agent to write scripts like this? See How to use Claude Code with Godot.

Step 6: Or slice it in Unity

  1. Select the sheet in the Project window. In the Inspector, set Texture Type to Sprite (2D and UI) and Sprite Mode to Multiple. For pixel art, set Filter Mode to Point (no filter).
  2. Click Sprite Editor, open the Slice dropdown and choose Grid By Cell Size, then enter the cell size the script printed (21 x 38 in our test). Grid By Cell Count works too, with the columns and rows.
  3. Click Slice, check the red outlines, then Apply. Unity creates one sprite per cell under the texture.

These steps come from the Unity 6 manual's cut out sprites from a texture and Sprite texture type pages. We did not test them in Unity. Not sure which engine to use? Read Godot vs Unity for beginners.

Licenses: what to keep track of

Free tools in this guide

PixelLab

Generates pixel art sprites, characters and animations for 2D games.

Pricing: Freemium, from $12/mo. Beginner rating: 5/5. Built specifically for pixel art game assets.

The free trial covers characters, rotations, inpainting and basic text animation, at up to 200x200.

Retro Diffusion

Creates retro style pixel art images and tiles from prompts.

Pricing: Paid, from $5 (top-up). Beginner rating: 5/5. Focused tool with clean pixel output and $0.50 of free balance for new accounts, no card needed.

$0.50 of free balance, true pixel grid output, and Advanced Animations that return a looping sprite sheet.

SpriteCook

Generates and animates 2D game art from text prompts, in pixel art or detailed HD style: characters, items, tilesets, seamless textures, UI kits and sprite sheets. Works in the browser, by API, or from coding agents through its MCP server.

Pricing: Freemium, from $8/mo. Beginner rating: 5/5. Simple prompt-to-sprite web app with a free plan, plus an MCP server if you already build with Claude Code, Codex or Cursor.

40 free credits every 30 days with commercial use. Free downloads are PNG or ZIP, so pack them with the script above.

Godot

Free, open source 2D and 3D game engine with its own easy scripting language, GDScript.

Pricing: Free. Beginner rating: 4/5. Small download, no fees or royalties, and a huge beginner community.

Free engine with AnimatedSprite2D and a built-in sprite sheet slicer.

Related

Comparing pixel art tools? Read PixelLab vs Retro Diffusion and Best AI tools for pixel art. Need backgrounds, icons or UI too? See Best free AI tools for 2D game art. Building your first game end to end? Start with Make your first game with free AI tools. Browse every 2D art and sprites tool and animation tool.

FAQ

What is a sprite sheet?

One image that holds every frame of a sprite's animation, laid out in a grid of equal cells. The engine shows one cell at a time to play the animation. A common layout is one row per animation (idle, walk, attack), with every cell the same size, like 32x32 or 64x64 pixels.

Can I make a sprite sheet with AI for free?

Yes, for a small project. PixelLab's free trial gives 40 fast generations, then 5 slower ones a day, at up to 200x200 pixels, and includes basic text animation. Retro Diffusion gives new accounts $0.50 of free balance, and its Advanced Animations (from $0.10 each) return a looping sprite sheet. SpriteCook's free plan gives 40 credits every 30 days, and an animation costs 20 to 26 credits. Packing the frames with the free Python script in this guide and importing into Godot costs nothing.

Can I sell a game with sprites from these free plans?

Per each tool's official pages, checked Oct 31, 2026: PixelLab's terms say you own the copyright to your creations for commercial use, and its pricing table lists commercial use on the free trial (you may not train other models on the output). Retro Diffusion says you own your outputs for personal and commercial projects. SpriteCook lists commercial use on every plan, including Free, with no credit required, but free generations appear in its public gallery.

What frame size should a beginner pick?

Pick one size and keep it for every character in the game. 32x32 or 48x48 suits small retro characters, 64x64 gives room for weapons and capes. Every frame of one animation must use the same canvas size, or the character will jump around when it plays.

Why does my character jitter when the animation plays?

The frames are not lined up. AI tools often place the character a few pixels differently in each image. Put every frame on the same canvas with the feet on the same bottom line. The packing script in this guide trims empty space and stands every frame on the floor of its cell for you.

Should I use AnimatedSprite2D or Sprite2D with hframes in Godot?

Start with AnimatedSprite2D. Godot's docs show its SpriteFrames panel slicing a sheet with Add frames from a Sprite Sheet, and you play animations by name in code. Sprite2D with Hframes and Vframes plus an AnimationPlayer is the other documented way, and it is handy when you also want to animate position or other properties.

Why do my pixel art sprites look blurry in Godot or Unity?

The engine is smoothing the pixels. In Godot 4, set Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter to Nearest. In Unity, set the texture's Filter Mode to Point (no filter).

Sources: PixelLab pricing table, PixelLab FAQ and PixelLab Terms of Service; Retro Diffusion home page and FAQ; SpriteCook pricing; Aseprite FAQ and Aseprite sprite sheet docs; LibreSprite; Godot 4.7 docs: 2D sprite animation, SpriteFrames, Sprite2D and ProjectSettings; Unity 6 manual: cut out sprites from a texture and Sprite texture type; Pillow Image docs. Checked October 31, 2026.

Get the free First Game Starter Pack

A 7-step path to your first tiny game, free art and sound you can actually use, and our AI tools kit for Godot, Unity, Unreal and Roblox. Plus one short tool tip a week. No spam, unsubscribe any time.

No spam. Unsubscribe in 1 click. Privacy See past issues

Preview of the First Game Starter Pack: the README, the AI Tools Kit and the first game checklist