How to Slice a Sprite Sheet That Isn't a Grid (Auto-Detect + Atlas Files)
Related reading: /blog/sprite-sheets-explained-game-devs · /video-to-sprite-sheet · /video-to-frames
Most sprite-sheet tutorials assume a perfect grid: every frame the same size, evenly spaced, ready for "columns × rows" slicing. Real sheets from asset packs rarely cooperate. A character's attack frame is wider than its idle frame, a UI icon sheet mixes 16px and 48px art, and a packed atlas has no grid at all — just rectangles crammed wherever they fit. Forcing those sheets through a grid slicer gives you frames cut in half and a lot of manual cropping.
There are two reliable ways to slice a non-grid sheet, and they match the two non-grid modes in our sprite sheet slicer: let the tool find the sprites from the image itself (auto-detect), or hand it the atlas file the packer already wrote (atlas mode). This guide explains when to use each, what each one needs from your sheet, and where each one fails.
Try the free tool this guide uses
Free, in your browser, no upload — your files never leave your device.
First, identify what kind of sheet you have
Before picking a mode, look at the sheet for thirty seconds. Three questions decide everything:
- Are all frames the same size and evenly spaced? If yes, stop — use Grid mode. It is the most predictable option, and nothing here beats it for uniform sheets.
- Are the sprites separated by empty space? If each sprite sits in its own island of transparency (or a flat background colour) with a visible gutter around it, auto-detect will work.
- Did the sheet arrive with a second file? A
.jsonor.xmlsitting next to the PNG — usually from TexturePacker, a game engine export, or another packer — is an atlas file. If you have one, use it: it is the packer's own record of where every sprite is, and it beats any guesswork.
TexturePacker's own splitter documentation describes the same three-way split: grid for uniform sheets, rectangular detection for sprites separated by transparent pixels, and a data-file mode when an atlas file exists (CodeAndWeb, TexturePacker tutorials).
Method 1: Auto-detect — let the tool find the sprites
Auto-detect works by scanning the sheet for connected regions of non-background pixels. In plain terms: it treats the corner pixel as the background, finds every island of sprite pixels separated from the others by background, and draws one rectangle around each island. Sprites of different sizes and uneven spacing come out at their true sizes, in reading order (left to right, top to bottom).
This is the right choice for:
- Loose asset sheets and icon boards, where an artist laid sprites out by eye rather than on a grid.
- Sprite collections cut from screenshots or scans, where no grid ever existed.
- Mixed-size animation frames, like a boss character whose attack frames are much wider than its walk frames.
It is also the mode Unity's Sprite Editor approximates with its Automatic slicing, which finds sprites by their transparent gaps. The same warning applies in both tools: automatic detection is genuinely useful for messy sheets of loose objects, and the wrong tool for a walk cycle whose limbs nearly touch (tsubu.art, Unity sprite-sheet guide).
What auto-detect needs from your sheet
- A visible gutter. Every sprite must be separated from its neighbours by background — transparent pixels or one flat colour. Sprites that touch or overlap merge into a single detected region, and no setting can un-merge them. If two frames touch, fall back to Grid or Atlas mode.
- A clean background. The detector reads the corner pixel as the background reference, so a sheet whose corner pixel is part of a sprite (for example, a full-bleed background illustration) can mis-detect. Trim the sheet to the sprite area first, or use Atlas mode.
- Consistent transparency. PNG with an alpha channel gives the cleanest detection. JPG sheets work when the background is one flat colour, but compression noise around sprite edges can create speck-sized false regions — if you see tiny junk frames, re-export the sheet as PNG.
Checking the result before you export
Always look at the overlay before downloading. Count the rectangles, and check that none spans two sprites and none clips a sprite's edge — that catches the common failure (merged neighbours) before it reaches your engine. Export is individual PNGs (transparency preserved) or one ZIP with an atlas JSON listing each frame's x, y, width, and height.
Method 2: Atlas file — use the packer's own rectangles
When a sheet was made by a packer, the packer already solved the detection problem and wrote the answers down. TexturePacker exports JSON in two shapes — hash format, where frames are keyed by filename, and array format, where they are a list — each frame carrying an x, y, w, h rectangle. Sparrow/Starling atlases use XML, with one SubTexture element per sprite carrying its name and rectangle. Loading that file into the slicer cuts by those exact rectangles: no guessing, no gutter requirement, no merged neighbours.
This is the right choice whenever the atlas file exists, full stop. It is also the only reliable choice for:
- Trimmed sheets, where the packer cut away transparent borders to save space. Auto-detect sees the trimmed sprite, not the original frame — the atlas file carries the original size and offset, so frames keep their alignment.
- Sheets with touching or overlapping sprites, where detection cannot separate them.
- Re-slicing a sheet you packed yourself, since the JSON you exported is the ground truth for that sheet.
The workflow is: drop the sheet image, switch the slicer to Atlas file mode, load the JSON or XML that belongs to that exact sheet, and check the overlay. If the atlas belongs to a different sheet (a common mistake after re-exporting), the rectangles will land in the wrong places — the overlay makes that obvious in seconds.
Which method for which sheet
| Sheet | Best mode | Why |
|---|---|---|
| Uniform grid, same-size frames | Grid | Exact, predictable, no detection risk |
| Mixed sizes, visible gutters, no atlas file | Auto-detect | Finds true boundaries without a grid |
| Any sheet with a matching JSON/XML atlas | Atlas file | The packer's own rectangles; handles trimmed and touching sprites |
| Sprites touching or overlapping, no atlas | Neither — fix the sheet | Separate the sprites with a gutter, or re-export with an atlas |
From sliced frames to a working animation
Sliced frames are only half the job. In Unity, import the PNGs as individual sprites and build the animation clip in frame order. In Godot, add the frames to a SpriteFrames resource in order. In Phaser, load the individual PNGs or keep the sheet plus the exported atlas JSON and load it as an atlas. Sheets made with our video to sprite sheet maker use the same format, so they can be re-sliced and rebuilt without conversion.
If you started from a video rather than a sheet, the path is: extract frames with the video to frames tool, pack or arrange them into a sheet, and slice from there. Each step stays in the browser, and no file is uploaded at any point.
Related Tools on This Site
- Sprite Sheet Slicer — Slice sprite sheets — grid, auto-detect, and atlas-file modes — into individual frames.
- Video to Frames — Extract frames from any video as a JPG/PNG/WebP image sequence — free, in your browser, no upload.
Frequently Asked Questions
How do I slice a sprite sheet with different-sized sprites?▼
Use auto-detect if the sprites are separated by transparent or flat-colour gutters — it finds each sprite's true bounding box regardless of size. If you have the packer's JSON or XML atlas file, use Atlas file mode instead: it cuts by the packer's exact rectangles and also handles trimmed and touching sprites.
What is a TexturePacker JSON atlas file?▼
It is the data file a texture packer writes alongside the sheet image, listing every sprite's name and rectangle (x, y, w, h) on the sheet. TexturePacker exports it in hash format (frames keyed by filename) or array format (frames as a list). Loading it into a slicer reproduces the packer's cuts exactly.
What is a Sparrow XML atlas?▼
It is the atlas format used by the Starling/Sparrow framework: an XML file with one SubTexture element per sprite, each carrying a name and rectangle. It serves the same purpose as TexturePacker JSON — the packer's record of where each sprite sits.
Why did auto-detect merge two of my sprites into one frame?▼
The two sprites touch or are separated by less than a visible gutter, so the detector sees one connected region. Separate them with background space and re-slice, or use Atlas file mode with the packer's rectangles. The same limitation applies to automatic slicing in engine sprite editors.
Why did auto-detect find tiny junk frames?▼
Usually JPG compression noise around sprite edges, or a background that is not one flat colour. Re-export the sheet as PNG with clean transparency and the false regions disappear. If the sheet's corner pixel is sprite-coloured, the background reference itself is wrong — trim the sheet first.
Can I slice a sprite sheet without installing software?▼
Yes. The slicer on this site runs entirely in your browser: drop the sheet, pick Grid, Auto-detect, or Atlas file mode, check the overlay, and download frames individually or as a ZIP with an atlas JSON. No upload, no account, and the sheet never leaves your device.
Do sliced frames keep transparency?▼
Yes. Frames export as PNG, so alpha is preserved exactly. That matters for game sprites, which are almost always layered over backgrounds, tiles, or other sprites in-engine.
Sources
- CodeAndWeb, TexturePacker tutorials, "How to split sprite sheets into individual sprites" — grid, rectangular (transparent-pixel), and data-file splitting modes: https://www.codeandweb.com/texturepacker/tutorials/how-to-split-sprite-sheets
- tsubu.art, "Sprite sheet for Unity" — automatic slicing finds sprites by transparent gaps; warns it can merge nearly-touching frames: https://tsubu.art/blog/sprite-sheet-unity
- PlayCanvas Developer Site, "Using Texture Packers" — why atlases are packed (fewer requests, single draw call) and TexturePacker JSON hash format: https://developer.playcanvas.com/user-manual/2D/texture-packing/
- Tool behaviour verified from the live site: /sprite-sheet-slicer Auto-detect (connected-region detection, corner-pixel background reference) and Atlas file (TexturePacker JSON hash/array, Sparrow XML) modes, shipped 2026-10-26; overlay preview, PNG export, ZIP + atlas JSON.

Muhammad Sachal (SachalSpeaks) is a Computer Science engineer specializing in client-side media pipelines, computer vision, and browser performance optimization. He builds free, privacy-first video tools at VideoToImageSequence.online — everything runs locally in your browser, nothing is uploaded.