TiledMetadata export

Tileset Generator for Tiled

Pack your tiles into one image and export a JSON tileset. Tiled opens the .tsj with the tile size, column count, and tile count already set.

A sprite sheet exported as a JSON tileset, next to the settings it needs in Tiled
What you export

Format menu

Tiled

JSON tileset (.tsj)

Format > Tiled downloads spritesheet.png and spritesheet.tsj. The tileset records tile width and height, columns, tile count, image size, and image file name. Margin and spacing are written as 0, which matches the image, because cells in this editor always touch. Open the .tsj in Tiled, or add it to a map as an external tileset, and the grid is already right.

Step by step

Getting the sheet into Tiled

  1. 1

    Lay out the tiles

    Set Columns to the width you want in the Tilesets panel and leave Padding at 0. Padding would show up as a transparent border on every tile.

  2. 2

    Export the .tsj

    Click Format in the Export panel and choose Tiled. Keep spritesheet.png next to the .tsj, since the tileset finds the image by file name.

  3. 3

    Open it in Tiled

    Use File > Open on the .tsj, or from a map use Map > Add External Tileset.

  4. 4

    Paint

    The Tilesets panel shows every tile at the right size. Terrain sets, collision shapes, and tile properties go on top from here.

Cheat sheet
SettingTiled value
Use in a mapMap > Add External Tileset
FormatJSON tileset (.tsj)
Tile sizetilewidth / tileheight = cell size
Layoutcolumns and tilecount, filled in
margin / spacingWritten as 0, matching the image
Built for the workflow

No New Tileset wizard

The .tsj already describes the grid it came from, so you never retype tile size or count.

Tile ids in sheet order

Tiled numbers tiles left to right and top to bottom, so the order you arrange here is the id order in every map.

Split then rebuild

Have an old tileset? Split it into tiles, rearrange or recolour them, and export a fresh sheet with a matching .tsj.

Troubleshooting

When the sheet fights Tiled

Tiles are misaligned after replacing the PNG

Cause
The .tsj stores imagewidth, imageheight, columns, and tilecount. A PNG with a different size or column count no longer matches those numbers.
Fix
Re-export both files whenever the grid changes. If only the artwork changed and the dimensions are identical, replacing the PNG alone is safe and keeps your Tiled data.

A map opens with the tileset missing

Cause
A map references an external tileset by relative path, so moving the .tsj breaks the link.
Fix
Keep maps, the .tsj, and the PNG in a stable folder layout and commit them together. Tiled offers to locate a missing tileset, and pointing it at the file once repairs the reference.

Tile ids shift and an existing map fills with the wrong tiles

Cause
Ids follow position. Inserting a tile in the middle renumbers everything after it.
Fix
Add new tiles at the end and keep Columns the same. A new row at the bottom leaves every existing id alone.

Collision shapes and terrain sets disappear after a re-export

Cause
The export writes a fresh .tsj, which replaces the file where Tiled saved what you authored.
Fix
Once you start authoring in Tiled, treat the .tsj as yours. Export new ones under another name and copy across what you need, or replace only the PNG when the grid has not changed.

The tileset ends with transparent tiles

Cause
tilecount is the number of frames in the editor, so blank frames you inserted become real, empty tiles. Unused cells after the last frame are not counted.
Fix
Remove blank frames before exporting. They are harmless when painting but still take up ids.
Versions and edge cases

Versions and edge cases

External versus embedded
An external tileset can be shared by many maps, so a fix reaches all of them. Embedding it in one map is simpler for a jam and painful once a second map needs the same tiles.
Phaser
this.load.tilemapTiledJSON does not resolve external tilesets. Embed the tileset in the map before exporting it (the Embed Tileset button in the Tilesets panel), then load the PNG under the tileset name.
Godot and Unity
Neither imports Tiled maps on its own. Community importers fill the gap; check whether yours expects external or embedded tilesets before you settle on one.
Tiled FAQ

More detail in the related guide, or compare every export format.

Other engines

Export for Tiled

Load your frames, check the loop in the Preview tab, then export. For Tiled that means: JSON tileset (.tsj).