Overview
What You Will Build
Use Tilemap Editor by PixLab to create a 40 × 30 tile map with 16 px tiles: a 640 × 480 level. Start with the built-in terrain tileset, paint a ground layer, then add decorations. You can use the same process for a platformer, top-down RPG, or puzzle map.
- The editor is free and needs no account. Your maps and tilesets are not uploaded.
- You can complete the editing steps with the built-in artwork. Custom tilesets are optional.
- Choose the Godot, Unity, or Phaser section for the engine you use. You do not need all three.
The export supplies the tile layout and images, not a complete game. Add characters, collision rules, and gameplay in your engine.
Step 1
Create a Map and Choose a Tileset
- Open Tilemap Editor and select Start a new project.
- Name it First Level. Set the tile size to 16, the width to 40 and the height to 30 tiles.
- Choose the built-in terrain tileset, the option with ground, platforms, and crates, then select Create project.
For your own artwork, choose Import your own tileset instead and match the tile size to the source image. The editor supports tiles from 1 to 256 px and maps up to 500 × 500 tiles. Use the tileset menu to set margin and spacing if your sprite sheet has gaps between tiles.
You can resize the map later with Map settings in the toolbar. Tile size can only be changed while the map is empty, so set it before painting.
Step 2
Paint the Ground and Platforms
Select a ground tile in the Tileset panel. Start with a strip of ground along the bottom of the map, then add a few platforms. Keep the first layout small so you can check the export before designing a larger level.
Brush and Line
Press B to place individual tiles. Use L to draw a straight platform or wall.
Fill and Rectangle
Press F to fill an area. Use R and drag to paint a rectangular block.
Multi-Tile Stamps
Drag across the tileset to select a crate, tree, or other multi-tile object, then stamp it onto the map.
Correct and Reuse
Use E to erase. Alt+click a tile on the map to pick it again, or undo a change with Ctrl+Z.
Pan with Space+drag or the middle mouse button. Use Ctrl+wheel or the zoom buttons for detail, 0 to fit the map, and G to toggle the grid. Press ? to see all shortcuts. Undo and redo keep up to 75 steps.
Step 3
Keep Terrain and Props on Separate Layers
- Rename the first layer Ground. In the Layers panel, double-click its name to edit it.
- Add a second layer named Decorations, select the same terrain tileset and paint crates or other props there.
- Drag the layers to change their order. Hide Decorations to inspect the ground underneath, or lock Ground while adjusting props.
Each layer uses one tileset. To add a different tileset, use Add in the Tileset panel and paint it on a separate layer. For the Phaser example below, keep both layers on the built-in terrain tileset.
Step 4
Export the Map and Its Tilesets
Choose Export > Game engine / Tiled map. Unzip the download before importing it into your engine. Keep the map and tileset paths together; copying only the map file leaves the importer without its images.
| Export file | What it is for |
|---|---|
| .tmx | Tiled XML map for importers such as YATI and SuperTiled2Unity. |
| .tmj | Tiled JSON map for Phaser, YATI, and compatible tools. |
| tilesets/ | The images referenced by the map. |
| csv/ | One tile-data CSV per layer for custom tooling. |
| README.txt | Import instructions included with your download. |
The Tilemap Editor export overview also covers Unreal Engine and other Tiled-compatible tools.
Godot 4
Import the Tilemap into Godot 4
- Install and enable YATI, the Tiled importer for Godot 4, following its setup instructions. Pick a release compatible with your Godot version.
- Copy the exported
.tmxor.tmjmap and itstilesetsfolder into your Godot project, preserving their relative paths. - Let YATI import the map, then instance the resulting scene in your level. Check that the terrain, decorations, and layer order match the editor.
Add your player, collision setup, and camera in Godot. Keep engine-side gameplay separate from the imported map so later map exports are easier to replace.
Unity
Import the Tilemap into Unity
- Install SuperTiled2Unity in your Unity project.
- Copy the exported
.tmxfile and tileset images into a folder underAssets. Keep the export's folder structure intact. - Wait for the importer to create the map prefab, then add it to your scene. Check tile scale, layer ordering, and image alignment.
The prefab uses Unity Tilemaps. Configure your game's collision and movement separately, and check the importer settings before replacing a map you have already integrated.
Phaser 3
Load the Tilemap in Phaser 3
For the First Level project with the built-in terrain tileset, copy first-level.tmj and the tilesets folder into your web project's assets/first-level/ directory. Serve the project through your development server, not a file:// URL.
This example assumes Phaser 3.50 or later is already loaded. It displays a map with one tileset across its layers; it does not add a player or physics. If you change the project name or artwork, update the two paths and the tileset name to match your export.
function preload() {
this.load.tilemapTiledJSON(
"level",
"assets/first-level/first-level.tmj"
);
this.load.image(
"terrain",
"assets/first-level/tilesets/template1.png"
);
}
function create() {
const map = this.make.tilemap({ key: "level" });
// "template1" is the tileset name inside the exported .tmj.
const tileset = map.addTilesetImage("template1", "terrain");
if (!tileset) throw new Error("Check the exported tileset name.");
map.layers.forEach((data, index) => {
const layer = map.createLayer(index, tileset, 0, 0);
if (!layer) throw new Error("Could not create tile layer.");
layer.setVisible(data.visible);
layer.setAlpha(data.alpha);
});
this.cameras.main.setBounds(0, 0, map.widthInPixels, map.heightInPixels);
}
new Phaser.Game({
type: Phaser.AUTO,
width: 640,
height: 480,
backgroundColor: "#20242b",
pixelArt: true,
scene: { preload, create }
});
The first argument of addTilesetImage() is the name inside tilesets[].name in the map file. The second is the texture key passed to load.image(). These are different identifiers even when you choose to give them the same name.
For multiple tilesets, load and bind each image, then pass the tilesets to createLayer(). See the Phaser 3 Tilemap reference and loader documentation for the API details.
Backup
Save an Editable Backup Before You Leave
Autosave keeps the project in the current browser using IndexedDB. It is convenient for your next editing session, but it is not a separate backup: clearing site data or losing browser storage can remove the project.
- Choose Export > JSON (project backup).
- Keep the file with your game's source assets. It includes the map, layers, settings, and embedded tileset images.
- To restore it, return to the editor home page and choose Import a project. You can do this in another browser or on another computer.
Keep both exports
The Tiled ZIP is for your engine; the JSON project backup is for returning to Tilemap Editor. A .tmj file is also JSON, but it is not the editor's project backup.
Troubleshooting
Check These Before Importing a Larger Map
The map imports, but tiles are missing
Confirm that the tileset images were copied alongside the map. Check file paths and letter case. In Phaser, check both the loaded texture key and the tileset name in the map.
Tiles look offset or include parts of neighboring tiles
Check tile size, margin, and spacing against your source image. Correct these settings in the editor and export again.
Props appear behind the ground or are invisible
Review the layer stack, visibility, and opacity before exporting. Then check how your engine imports or draws those layers.
The map is visible, but the player falls through it
Painting a ground tile does not define a collision rule. Configure collisions and physics in the engine or add the required data in your map-processing workflow.
The editor warns that saving failed
Download the offered backup before clearing storage or closing the project. Avoid editing the same project in two tabs at once.
FAQ
Frequently Asked Questions
Is Tilemap Editor free to use?
Yes. Tilemap Editor by PixLab is free and runs in your browser without an account or installation. You can use the built-in tilesets or import your own images.
Can I use the exported map with Godot, Unity, and Phaser?
Yes. The game-engine ZIP contains Tiled .tmx and .tmj maps plus tileset images. Godot 4 uses YATI, Unity uses SuperTiled2Unity, and Phaser can load the .tmj file. Add your game logic and collision setup in the engine.
Can I import a .tmx map back into Tilemap Editor?
No. The editor restores its own JSON project backups, not .tmx maps. Keep a JSON backup before leaving the editor. You can open the exported .tmx or .tmj files in Tiled for further editing there.
Does the project backup include my tileset images?
Yes. Export > JSON (project backup) includes the map, layers, settings, and embedded tileset images. Use Import a project on the editor home page to restore it in another browser or on another computer.
Are my maps or tilesets uploaded?
No. Editing and autosave happen in your browser, with projects stored in IndexedDB. There is no automatic cloud sync. Keep a separate JSON backup because browser storage can be cleared or lost.
What does the Phaser code example require?
It requires Phaser 3.50 or later, a development server, and the exported map and tileset files. The example uses First Level with the built-in terrain tileset. Update file paths and tileset names for other projects, and load each image if your map uses multiple tilesets.
Next steps
Build Your First Map, Then Test the Export
Start with a small level and confirm that it loads in your engine. Once that path works, expand the map and keep a JSON backup at each useful milestone.