DevTools Logo

Sprite Sheet Packer

Sprite Sheet Packer

Pack PNG frames into a trimmed atlas with engine-ready JSON or CSV metadata.

Runs in your browser

Sprites & packing

0 sprites · 0 pages

Add PNG frames or load the sample set.

Atlas & metadata

No sprites have been packed yet.

Examples

Animation atlas

Input
40 frames, 64×64, rotation on, POT on
Output
512×256 atlas + frames JSON hash

MaxRects places the trimmed frames densely and records each rectangle for the engine.

Texture filtering safety

Input
spacing 2 px · extrude 1 px
Output
Frames are separated and edge pixels are duplicated outward.

Spacing and extrusion prevent neighboring frames from bleeding into each other under linear filtering.

Custom loader

Input
CSV export
Output
name,x,y,w,h,rotated,page

A simple table is easier to consume in a bespoke runtime than nested JSON.

About this tool

Sprite Sheet Packer turns a folder of frame images into a trimmed atlas plus engine-ready coordinates. Each image is decoded locally, its alpha bounding box is measured, and the trimmed rectangle is laid out by a best-short-side-fit MaxRects packer. Sprites can rotate 90 degrees, spacing and edge extrusion are configurable, and canvases can be exact-fit or independently rounded up to a power of two on each axis.

Metadata is the important half of the job: the JSON hash export follows TexturePacker's shape with frame rectangles, rotation and trimmed flags, spriteSourceSize and sourceSize; a plain JSON array and a CSV table are available for custom loaders. Duplicate filenames receive numeric suffixes, fully transparent images are skipped with a notice, and sprites larger than the maximum page are listed rather than silently dropped. Utilization statistics make the cost of power-of-two rounding visible.

The atlas is rendered on a canvas and downloaded as PNG; metadata is copied or downloaded separately. Everything happens in your browser — no frame is uploaded and no account is needed.

What this tool does not do

  • Packing is geometry-only; image decoding and canvas rendering use browser APIs and are not available in Node.
  • The atlas preview uses colored placeholders for sample frames; real images are drawn on canvas for export.
  • Video sprites and animation timing data are not included — this tool emits static rectangles only.
  • Very large inputs are capped by canvas dimensions; split sheets across pages when needed.

How to use this tool

  1. Add frames

    Choose multiple PNG, JPG or WebP files, or click Load sample frames to try the workflow instantly.

  2. Tune the layout

    Set maximum page dimensions, spacing, extrusion, trim margin, sort strategy and rotation, then watch the atlas re-pack.

  3. Review the atlas

    Inspect each page preview and the utilization percentage. Check the warning list for transparent or oversized sprites.

  4. Export

    Download the atlas PNG, then copy or download JSON hash, JSON array or CSV metadata for your engine.

Use cases

Indie game animations

Pack walk, run and attack frames into one atlas without installing a desktop texture packer.

Web game optimization

Reduce HTTP requests and texture binds by combining sprites into a single power-of-two sheet.

Asset delivery

Send an artist a sheet plus coordinates that load directly into the project's existing sprite format.

Metadata exports

FormatShape
JSON hashframes: { name: { frame, rotated, trimmed, spriteSourceSize, sourceSize } }, meta { image, size, scale }
JSON arrayOne object per sprite with name, x, y, w, h, rotated and page
CSVname,x,y,w,h,rotated,page — one row per sprite
Atlas PNGCanvas-rendered sheet at the computed page size

Rotation metadata uses the post-rotation frame dimensions so loaders can swap width and height correctly.

Common mistakes

Mistake:Assuming extrusion changes the metadata frame rectangle.

Fix:Metadata frames describe the trimmed sprite; extrusion is drawn at export time and clamped at page bounds.

Mistake:Using a sheet with an engine that ignores the rotated flag.

Fix:Turn rotation off before packing; the metadata records rotated per sprite precisely because loaders must honor it.

Mistake:Wondering why power-of-two pages waste space.

Fix:The utilization figure reports the cost; use exact-fit mode if your engine no longer requires POT textures.

Mistake:Expecting duplicate filenames to be merged.

Fix:They are suffixed with _2 and reported, because metadata keys must be unique.

Frequently asked questions

What packing algorithm is used?

Best-short-side-fit MaxRects. Each sprite is placed in the free rectangle where the leftover short side is smallest, that free space is split into up to four remainder rectangles, and contained rectangles are pruned. Sprites are sorted by area by default, with name and longest-side alternatives.

Why choose power-of-two canvas sizes?

Older GPUs and some engines require POT textures for mipmaps and wrapping. The packer rounds each axis independently, and the utilization figure shows how much space that rounding wastes. Exact-fit mode is available when POT is not required.

What is extrusion for?

Edge pixels are duplicated outward around each trimmed frame so linear filtering cannot sample a neighboring sprite's pixels at the frame boundary. Extrusion is applied in the rendered atlas; metadata rectangles still describe the trimmed sprite.

Which engines read the JSON?

The JSON hash export follows TexturePacker's common format — frame rectangles, rotated and trimmed flags, spriteSourceSize and sourceSize — which is supported by Phaser, PixiJS, Cocos and many custom loaders. A plain JSON array and CSV are offered for bespoke runtimes.

Are my sprites uploaded?

No. Images are decoded into canvases in your browser, the geometry is computed locally, and the PNG and metadata are generated client-side. There is no upload endpoint or account.

What happens to transparent or duplicate sprites?

Fully transparent images are skipped with a notice because they have no content bounds. Duplicate names get _2, _3 suffixes so metadata keys stay unique, and sprites larger than the maximum page are listed in the warning area.

References & standards