Skip to content
/craftcmd

Replace One Block Type with Another

Swap every block of one type for another in a region

✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026

Replaces every dirt block in an 11×11×11 region with stone, leaving all other blocks untouched. Swap 'dirt' and 'stone' for any block IDs you need — useful for terraforming or quickly changing build materials.

/fill ~ ~ ~ ~10 ~10 ~10 stone replace dirt
42 characters

How to use

  1. Stand at one corner of the region you want modified.
  2. Open chat and paste the command — change the two block IDs at the end.
  3. Press Enter — only the specified block type is replaced instantly.

Related commands

Create a hollow room or box out of any block

/fill ~ ~ ~ ~10 ~6 ~10 stone hollow

Create a pool or lake by filling a region with water

/fill ~ ~ ~ ~10 ~ ~10 water

Copy a region of blocks and paste it somewhere else

/clone ~-5 ~-5 ~-5 ~5 ~5 ~5 ~15 ~-5 ~-5
Clear a Region with Air
Clear a Region with Air Awaiting in-game verification
Both

Delete all blocks in a large area quickly

/fill ~-10 ~-2 ~-10 ~10 ~10 ~10 air
Fill Area with Water
Fill Area with Water Awaiting in-game verification
Both

Quickly fill a region with water

/fill ~-5 ~ ~-5 ~5 ~3 ~5 water
Create Hollow Box (Outline Only)
Create Hollow Box (Outline Only) Awaiting in-game verification
Both

Build a hollow rectangular frame without solid interior

/fill ~-5 ~ ~-5 ~5 ~4 ~5 stone hollow