Sprite Sheet Generator — CSS & Game Sprites Online Free | LazyTools

Sprite Sheet Generator

Combine multiple images into a CSS sprite sheet online — free. Downloads the sprite PNG, ready-to-paste CSS background-position code for every sprite, and a JSON manifest for Phaser and PixiJS game engines. Retina @2x mode. No software, no upload, 100% browser-based.

Free forever CSS + JSON + PNG Retina @2x mode Phaser & PixiJS ready

Sprite Sheet Generator Tool

Drop your images here to build a sprite sheet
PNG, JPG, GIF, WebP, SVG · Multiple files · Processed locally — never uploaded
0 images
Generate a sprite sheet to see the CSS output
Generate a sprite sheet to see the JSON manifest
Generate a sprite sheet to see individual sprites
Generate a sprite sheet to see HTML usage examples
⭐ User Ratings

Rate this tool

4.7
Based on 89 ratings
5
64
4
15
3
5
2
3
1
2
Was this sprite sheet generator helpful?
✅ Thank you for your rating!
✦ Features

Everything in this free online sprite sheet generator

Built for web developers, game developers and icon designers who need a professional sprite atlas without paying for TexturePacker or installing software.

Multi-image drag-and-drop upload
Drop as many images as you need in one go. Accepts PNG, JPG, GIF, WebP and SVG. Add more images at any time or remove individual sprites from the queue.
Grid, horizontal strip and vertical strip layouts
Grid mode arranges sprites in a configurable number of columns — ideal for icon sets. Horizontal strip packs all sprites in a single row — standard for CSS sprites. Vertical strip stacks into a single column.
Auto-generated CSS background-position code
Every sprite gets its own CSS rule with the exact background-position, width and height values. Customise the class name prefix (default: .sprite) to match your project naming convention.
JSON manifest for Phaser & PixiJS
Exports a complete JSON spritesheet manifest with the name, x, y, width and height of every sprite — the format used by Phaser 3, PixiJS and most game engine atlas loaders. Absent on all other free tools.
Retina @2x mode
Generates a sprite sheet at 2× pixel density with automatically adjusted CSS background-size declarations. Your sprites look sharp on high-DPI Retina and 4K displays. No other free tool offers this.
Live preview of individual sprites
The Preview tab renders each individual sprite using the generated CSS — so you can visually verify that every background-position offset is correct before downloading. No other free CSS sprite generator shows this.
Configurable padding and columns
Set the gap between sprites in pixels (0–40px) and the number of columns in grid mode. Padding prevents neighbouring sprites bleeding into each other when the browser sub-pixel renders background positions.
100% browser-based — no upload to server
Your images are packed using the HTML Canvas API entirely in your browser. Nothing is uploaded to LazyTools or any server. Proprietary icons, client assets and game art stay on your device.
📖 How to use

How to create a CSS sprite sheet online — step by step

Upload your images
Drag and drop all your sprite images onto the upload zone — or click Choose images. You can upload multiple files at once. Each image appears as a thumbnail in the queue. Add more at any time by clicking the + button in the queue row.
Choose layout and settings
Select Grid (best for icon sets — configure number of columns), Horizontal Strip (classic CSS sprite layout — all images in a single row) or Vertical Strip (single column). Set padding between sprites and optionally enable Retina @2x mode for high-DPI displays. Customise the CSS class prefix to match your project.
Click Generate sprite sheet
The sprite PNG appears in the preview pane on the left. The right panel shows your generated CSS code (CSS tab), JSON manifest (JSON tab), live sprite preview (Preview tab) and HTML usage example (HTML tab). Stats at the bottom show sheet dimensions, sprite count and estimated file size.
Download the files
Click Download PNG to save the sprite sheet image. Click CSS to download the stylesheet. Click JSON to download the manifest for your game engine or design token system. Use all three files together in your project.
Use in your project
Place the PNG in your project directory, link the CSS file in your HTML, and reference individual sprites by their generated CSS class name. For game engines: load the JSON manifest using Phaser's this.load.atlas() or PixiJS's Assets.load.bundle().
🏆 Why LazyTools

How this sprite sheet generator compares

We reviewed every free online CSS sprite generator and game sprite tool. Here's the honest feature comparison.

Feature LazyTools ✦ Instant Sprite Final Parsec CodeShack
Generate sprite sheet from multiple images✔ Yes✔ Yes✔ Yes✔ Yes
Grid, horizontal and vertical layout modes✔ All three✔ Grid only✔ Yes✘ Grid only
Auto-generated CSS background-position✔ Yes✔ Yes✔ CSS export✘ No
Custom CSS class name prefix✔ Yes✘ No✘ No✘ No
JSON manifest for Phaser / PixiJS✔ Yes✘ No✘ No✘ No
Retina @2x mode with adjusted CSS✔ Yes✘ No✘ No✘ No
Live sprite preview (verify offsets visually)✔ Yes✘ No✘ No✘ No
HTML usage example code✔ Yes✘ No✘ No✘ No
Configurable padding between sprites✔ Yes✘ No✔ Yes✘ No
100% client-side (no image upload)✔ Always✔ Yes✔ Yes✘ Uploads
Download PNG + CSS + JSON in one session✔ Yes✘ PNG only✘ PNG + CSS✘ PNG only
📊 Reference

CSS sprites explained — the background-position technique

Understanding how CSS sprites work helps you use them more effectively and debug any display issues that arise.

How CSS background-position works for sprites

Each sprite in the sheet is shown by setting the combined image as a background-image on a container element, then using background-position to offset the image so only the correct sprite is visible through the container's constrained width and height. For example:

.sprite-github { background-image: url('sprites.png'); background-position: -48px -0px; width: 32px; height: 32px; display: inline-block; }

The negative x and y values move the background image left and up within the container, exposing only the target sprite. The container's width and height clip everything else.

When to use sprites vs individual image files

CSS sprites are most valuable when you have many small images — navigation icons, social media logos, UI state indicators, button icons — that are loaded repeatedly across a page or application. Combining them into one file means one HTTP request instead of many, which has a measurable impact on page load time, particularly on high-latency connections or for first-time visitors with cold caches.

Modern HTTP/2 context: HTTP/2 multiplexes multiple requests over a single connection, which reduces (but doesn't eliminate) the HTTP request overhead that originally made CSS sprites essential. However, sprites still offer two advantages in HTTP/2: they reduce DNS lookups and eliminate per-request TLS overhead. For large icon sets (20+ icons), sprites remain a performance win.

JSON spritesheet manifest format

Game engines like Phaser 3 and PixiJS use a JSON atlas format to load sprite sheets. The JSON file describes where each sprite lives in the sheet, allowing the engine to extract individual frames by name:

{ "frames": { "player-idle": { "frame": { "x": 0, "y": 0, "w": 64, "h": 64 }, "rotated": false, "trimmed": false }, "player-run-1": { "frame": { "x": 64, "y": 0, "w": 64, "h": 64 }, "rotated": false, "trimmed": false } }, "meta": { "image": "sprites.png", "size": { "w": 512, "h": 256 }, "scale": "1" } }

This format is compatible with Phaser 3's this.load.atlas(), PixiJS's PIXI.Assets.load(), and most other game framework atlas loaders.

Retina @2x sprite sheets — how they work

A retina (or HiDPI) sprite sheet contains images drawn at 2× the intended display size. When loaded in CSS, the background-size is set to 50% of the actual image dimensions, making each sprite display at the correct size. The doubled pixel density means each sprite appears twice as sharp on Retina MacBook screens, iPhone screens and 4K monitors.

/* Standard sprite */ .sprite-logo { background-position: -0px -0px; width: 32px; height: 32px; } /* @2x retina variant (same element, loads via media query) */ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .sprite-logo { background-image: url('sprites@2x.png'); background-size: 256px 128px; /* half the actual image size */ } }
📖 Guide

The Complete Guide to CSS Sprite Sheets and Game Sprite Atlases

Sprite sheets are one of the oldest performance optimisation techniques in web development — and one of the most relevant to game development. Whether you're building a website that uses dozens of small icons, a Phaser game with animated characters, or a PixiJS application with a complex UI, understanding how sprite sheets work and how to generate them efficiently matters for both performance and workflow.

What is a sprite sheet and why does it matter?

A sprite sheet (also called a texture atlas or sprite atlas) is a single image file that contains multiple smaller images packed together. Instead of loading 30 separate icon files, you load one sprite sheet and use CSS or a game engine's atlas loader to display each individual image from its known position within the sheet.

The performance case is straightforward: every HTTP request has latency overhead — DNS lookup, TCP connection (or reuse), TLS handshake, request-response round trip. On a fast broadband connection, each request adds perhaps 50ms. On a mobile network, each request might add 200ms or more. A page that loads 30 small icons with 30 separate requests can take 1.5–6 seconds of cumulative latency just from those HTTP round trips. Loading the same 30 icons as a single sprite sheet — one HTTP request — eliminates that overhead entirely.

CSS sprites for web development

For web developers, CSS sprite generation is primarily about icon sets, navigation graphics and UI state images (hover, active, disabled states of the same icon). The workflow is: combine all icons into one sprite sheet image, then use CSS background-position to show only the relevant icon in each HTML element.

The CSS generated by this tool follows the most widely used naming convention: a configurable prefix (default .sprite) followed by a hyphen and the source filename without extension. This keeps class names predictable and matches the original filename, making it easy to look up any sprite in the stylesheet.

A complete CSS sprite workflow for an icon navigation:

  • Prepare each icon as a PNG with transparent background, at the exact size you want it displayed (e.g. 24×24px for a standard icon, 48×48px for a retina icon)
  • Upload all icons to the sprite generator, choose Grid or Horizontal layout, set 2px padding, and generate
  • Download the sprite PNG and CSS file. Add the CSS link to your HTML. Add the generated class names to your HTML elements
  • If supporting retina displays: also generate a @2x sheet with the same images drawn at 48×48px, and load it via the @media (-webkit-min-device-pixel-ratio: 2) media query

Game sprite sheets with Phaser 3 and PixiJS

Game development has a different use case for sprite sheets. In games, a sprite sheet typically contains all the frames of a character's animation arranged in sequence — walk cycle, idle, attack, jump. A game sprite sheet generator needs to output not just the packed image but also a data file (JSON or XML) that tells the engine exactly where each frame sits.

Phaser 3 uses its atlas loader to import sprite sheets:

// In your Phaser scene's preload(): this.load.atlas('player', 'sprites/player.png', 'sprites/player.json'); // In create(): this.add.sprite(400, 300, 'player', 'player-idle');

The JSON file this tool exports matches this format exactly. Each frame's name comes from the original filename (without extension), so if you upload player-idle.png, it appears in the JSON as "player-idle" and in Phaser's texture cache under that key.

For PixiJS, the same JSON format works with the Assets API:

await PIXI.Assets.load([ { alias: 'player', src: 'sprites/player.json' } ]); const idleTexture = PIXI.Texture.from('player-idle');

Why padding between sprites matters

Even with correct background-position values, sub-pixel rendering on some browsers and screen sizes can cause edge pixels from adjacent sprites to bleed into the displayed area. Adding 1–4 pixels of transparent padding between each sprite prevents this bleeding entirely. The generated CSS accounts for the padding automatically — the background-position values already include the offset for your chosen padding value.

Free sprite sheet generator vs TexturePacker

TexturePacker is the industry-standard professional sprite atlas tool — it offers advanced packing algorithms (maxrects, shelf, polygon) that produce smaller sheets than grid-based packing, supports dozens of export formats, and integrates with Unity, Unreal, Godot and every major game engine. For professional game development with complex assets, it's worth the cost.

For web development, small games, prototypes, icon sets, and any project where a simple grid-based or strip layout is sufficient, this free browser-based sprite sheet generator covers all the bases — without installation, without cost, and without uploading proprietary art to a third-party server. The JSON format it outputs is compatible with Phaser and PixiJS without any additional tooling.

Frequently asked questions

A CSS sprite sheet is a single image file that combines multiple smaller images — icons, buttons or UI elements — into one. Each individual image is displayed using the CSS background-position property to show only the relevant area of the combined image. This technique reduces HTTP requests and improves page load performance.
Upload all your sprite frame images, select Grid or Horizontal Strip layout, and click Generate. Download the PNG sprite sheet and the JSON manifest file. Load them in Phaser using this.load.atlas('key', 'sprites.png', 'sprites.json') or in PixiJS using PIXI.Assets.load(). The JSON format this tool exports is compatible with both engines.
Retina @2x mode generates a sprite sheet at double the pixel density. The CSS sets background-size to half the actual image dimensions, so sprites appear at the correct size on standard displays but look sharp on Retina MacBooks, iPhones and 4K monitors. Load the @2x sheet for high-DPI devices using the @media (-webkit-min-device-pixel-ratio: 2) media query.
No. This sprite sheet generator runs entirely in your browser using the HTML Canvas API. Your images are never uploaded to LazyTools or any server. All packing, CSS generation and JSON export happens locally on your device — you can disconnect from the internet after the page loads and it continues to work.
Padding prevents adjacent sprites from bleeding into each other due to sub-pixel rendering on some screens and browser zoom levels. 1–4px of transparent padding between sprites is generally sufficient for web use. For game engines at integer zoom levels, 0px padding works fine. The generated CSS automatically accounts for your chosen padding value in all background-position calculations.
🔗 Related tools

More free image and developer tools