# Replace tiles in entire map

**URL:** <https://discourse.mapeditor.org/t/replace-tiles-in-entire-map/5538>\
**Category:** Uncategorized\
**Created:** [April 8, 2022, 11:58pm UTC](https://discourse.mapeditor.org/t/replace-tiles-in-entire-map/5538 "2022-04-08T23:58:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![monogamegirl](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@monogamegirl](https://discourse.mapeditor.org/u/monogamegirl)\
**Post date:** [April 8, 2022, 11:58pm UTC](https://discourse.mapeditor.org/t/replace-tiles-in-entire-map/5538/1 "2022-04-08T23:58:58Z")

</div>

How can i replace a tile from tileset 1 with another tile from tileset 2 in the entire map?

---

<div class="post-metadata">

**Author:** ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)\
**Post date:** [April 9, 2022, 12:35pm UTC](https://discourse.mapeditor.org/t/replace-tiles-in-entire-map/5538/2 "2022-04-09T12:35:28Z")

</div>

Tiled-native way, has to be done _per layer_: Use the Select Same Tile tool to select all instances of the tile you want to replace on the current layer, and then use the Bucket Fill Tool _while holding Shift_ to fill that selection with the new tile.  
Repeat for each layer.  
Shift makes the Bucket Fill disregard any existing tiles in the map, so it’ll fill everything in your selection.

If you have a lot of layers, then the Tile Replace Tool script I wrote might help: [tiled-scripts/Replace Tile Tool at main · eishiya/tiled-scripts · GitHub](https://github.com/eishiya/tiled-scripts/tree/main/Replace%20Tile%20Tool)  
Using this tool, you can just click any tile to replace all instances of it with the selected tile. By default it only replaces tiles on the selected layer and within the selection, but if you hold Shift, it’ll replace all instances of that tile on _all_ layers, including even Object layers.

If you have a lot of different tiles you want to replace, I also have this script: [tiled-scripts/MassReplaceTiles.js at main · eishiya/tiled-scripts · GitHub](https://github.com/eishiya/tiled-scripts/blob/main/MassReplaceTiles.js)  
This one lets you set up a special map with an “old” layer of tiles you want to replace, and a “new” layer with tiles you want to replace those tiles with, and then you can perform that replacement on your map or all open maps.

---

<div class="post-metadata">

**Author:** ![monogamegirl](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@monogamegirl](https://discourse.mapeditor.org/u/monogamegirl)\
**Post date:** [April 10, 2022, 9:36pm UTC](https://discourse.mapeditor.org/t/replace-tiles-in-entire-map/5538/3 "2022-04-10T21:36:56Z")

</div>

Wouldn’t it be a good idea to add a tile replace feature in Tiled?  
Because then all those scripts won’t be needed.  
I think replacing tiles is a common feature everybody can use?
