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
Fill a Hollow Box (Build a Room)
Create a hollow room or box out of any block
Fill an Area with Water
Create a pool or lake by filling a region with water
Clone (Copy) a Structure
Copy a region of blocks and paste it somewhere else
Clear a Region with Air
Delete all blocks in a large area quickly
Fill Area with Water
Quickly fill a region with water
Create Hollow Box (Outline Only)
Build a hollow rectangular frame without solid interior