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 2026Replaces 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 dirt42 characters
- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Stand at one corner of the region you want modified.
- Open chat and paste the command — change the two block IDs at the end.
- 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 hollowCreate a pool or lake by filling a region with water
/fill ~ ~ ~ ~10 ~ ~10 waterCopy a region of blocks and paste it somewhere else
/clone ~-5 ~-5 ~-5 ~5 ~5 ~5 ~15 ~-5 ~-5Delete all blocks in a large area quickly
/fill ~-10 ~-2 ~-10 ~10 ~10 ~10 airQuickly fill a region with water
/fill ~-5 ~ ~-5 ~5 ~3 ~5 waterBuild a hollow rectangular frame without solid interior
/fill ~-5 ~ ~-5 ~5 ~4 ~5 stone hollow