Skip to content

TexturePacker to Godot 4 — JSON Atlas to SpriteFrames

You have a sheet packed by TexturePacker, or by another packer that writes its JSON, and a Godot 4 project. Drop the PNG and the JSON together: every frame is read with its trim, frames are grouped into animations by name, and the export is a SpriteFrames .tres with an AnimatedSprite2D scene, the bundle format Godot 4.7.2 loaded and drew frame by frame in the verification runs. No editor plugin is involved.

Drop a sprite sheet, numbered frames, a GIF / APNG or an .aseprite file
Runs in your browser. Files are not uploaded.
Studio Sprite workspace: an Aseprite JSON atlas opened with its sheet, 6 frames with their durations grouped into one animation
The real Studio with a CC0 asset (OpenGameArt).
Exports to
  • Godot 4Verified· Godot 4.7.2
  • Unity 6Verified· Unity 6000.5.3f1
  • Phaser 3 / 4Verified· Phaser 3.90 + 4.2
  • PixiJS 8Verified· PixiJS 8.21
  • Aseprite JSONVerified· Phaser load.aseprite · PixiJS 8.21
  • .asepriteVerified· Aseprite 1.3.18
  • Spine / libGDXVerified· spine-canvas 4.2
  • Starling / Sparrow XMLVerified· Phaser 4.2
  • LÖVEVerified· LÖVE 11.5
  • DefoldBuilt· Defold bob.jar 1.13.1
  • GameMakerUNVERIFIED
  • CSS spritesVerified· Chromium
  • GIF / APNGDecoded· Pillow

What it does

  • Hash and array JSON, trimmed frames included: spriteSourceSize and sourceSize become each frame's full canvas and offset.
  • Animations from frame names: walk_01, walk_02 … become "walk", in natural order (2 before 10); the names themselves are kept.
  • A pivot stored in the JSON is used; otherwise frames start with a bottom-centre pivot that you move with the pivot tool (P).
  • TexturePacker JSON carries no timing, so every frame starts at 100 ms; set real durations per frame or per tag before exporting.
  • The bundle: SpriteFrames .tres (AtlasTexture region + margin), an AnimatedSprite2D .tscn with Nearest filtering and the pivot as offset, and a .png.import with fix_alpha_border off.

How to do it

  1. Drop the PNG and its .json together (the JSON names its image in meta.image).
  2. Read the Import panel: frame count, how the animations were grouped, frames lying outside the image.
  3. Fix names, tags and timing on the Timeline and preview with Enter.
  4. Open Pack & Export, choose Godot 4 and export; this target never rotates frames.
  5. Copy the folder anywhere under res:// and drag the .tscn into a scene, or give the .tres to your own AnimatedSprite2D.

TexturePacker JSON fields and where they land in Godot

TexturePacker JSONIn the StudioIn the Godot 4 bundle
frames key or filenameframe name, extension droppedanimation name from its prefix; frame entry in metadata
frame {x, y, w, h}the frame's region on your sheetAtlasTexture region on the newly packed page
spriteSourceSize, sourceSizefull frame canvas and offsetAtlasTexture margin restores the full size
pivotframe pivot (default bottom centre)AnimatedSprite2D offset; every pivot kept in metadata
rotated: trueimported still turnedUNVERIFIED; repack without rotation
meta.imagepairs the JSON with its PNGPNG page plus .png.import (lossless, no mipmaps)
no timing field100 ms per frame until you change itanimation speed plus relative frame durations

Engine exports and how each was checked

"Verified" means the exported files were loaded by the real engine or tool on real CC0 assets and the result was compared with the source. Anything that was not loaded is labelled as such.

TargetFilesCheck
Godot 4.tres SpriteFrames · .tscn AnimatedSprite2D · .png.importVerified Godot 4.7.2Loaded by Godot; every animation frame drawn and compared with the source file. The scene uses Nearest filtering; rotation is never used.
Unity 6.unity.json · Editor/NerulioSpriteImporter.cs · AnimationClipVerified Unity 6000.5.3f1Batch mode: sprite rects, pivots, pixels, clip keys and durations checked.
Phaser 3 / 4atlas JSON (multiatlas) · .anims.jsonVerified Phaser 3.90 + 4.2Frames and animations drawn by both versions.
PixiJS 8spritesheet JSON · animations · anchor · meta.scaleVerified PixiJS 8.21Rotated and multi-page atlases included.
Aseprite JSONhash / array · frameTags · slicesVerified Phaser load.aseprite · PixiJS 8.21Tags keep their direction and repeat count.
.asepritelayers · tags · durations · slicesVerified Aseprite 1.3.18Opened and rendered by the Aseprite command line.
Spine / libGDX.atlasVerified spine-canvas 4.2Every region drawn by the Spine runtime, rotated and trimmed; libGDX itself was not run.
Starling / Sparrow XMLXML per pageVerified Phaser 4.2Phaser 3.90 draws trimmed XML frames wrongly (its own bug); the "Sparrow XML (Phaser 3)" preset turns trim off and passes in 3.90 and 4.2.
LÖVELua quads · nerulio_atlas.lua · main.luaVerified LÖVE 11.5Every frame drawn and every animation stepped through the shipped helper.
Defold.atlas · .tilesourceBuilt Defold bob.jar 1.13.1Built by Defold's command-line builder; the built texture's UVs were read back.
GameMakerspr_<name>_stripN.png · gamemaker.jsonUNVERIFIEDNot loaded in GameMaker (no headless GameMaker). The strips are cut the way its strip importer cuts them.
CSS sprites.css · preview .htmlVerified ChromiumEvery class drawn from the shipped stylesheet.
GIF / APNGone file per animationDecoded PillowEvery frame and delay decoded again after export; APNG is exact.

Evidence

GIF decoder: 408 of 408 frames identical to Pillow on 29 real GIFs; APNG 132 of 132 on 16 files. .aseprite: 231 corpus files imported, re-written and reopened in Aseprite 1.3.18 with the same tags, durations and pixels (231/231). Exports: 49 runs in the real engines on real CC0 assets, 47 pass — the 2 failures are Phaser 3.90's trimmed-XML bug, which the Phaser 3 preset avoids.

Limits

  • A grid or island guess is a preview with a confidence; nothing is cut until you press Apply, and every choice has one-click alternatives.
  • .aseprite files whose layers do not compose exactly (e.g. group opacity) are imported flattened, and the Import panel says why.
  • Rotated frames in an imported atlas stay rotated; their export is UNVERIFIED.
  • Images up to 32,768 px per side (268 million pixels), subject to your browser's memory.

Questions

What about frames TexturePacker stored rotated?

They are imported as they lie on the sheet, still turned, and exporting them is UNVERIFIED. Repack in TexturePacker with rotation off and drop the new files; Godot's AtlasTexture cannot rotate a region, which is why the Godot target never packs rotated.

Does Godot keep the frame timing?

Yes, in Godot's own terms: each animation's speed is its fps and every frame's duration is relative to it, so 250 ms at 12 fps is written as 3.0. Reverse and ping-pong are written out as frame order. Godot 3.x cannot read this resource.

Where do my hitboxes end up?

Boxes and collision polygons drawn in the Studio are stored in the SpriteFrames metadata under "nerulio" (sprite_frames.get_meta("nerulio")), not created as nodes.

Is it free, and do I need an account?

Everything on these pages is free and works without an account. There is no watermark and no export that is held back.

Are my sprites uploaded?

No. The Studio decodes, packs and exports in this browser tab. Projects are autosaved in the browser (IndexedDB) and can be saved as a .nerulio file.

Does it need Aseprite or an engine plugin installed?

No. .aseprite files are read and written in the browser, and each engine bundle carries what that engine needs (for Godot, the import settings and scene; for Unity and the Godot TileSet, a small editor script).