Replace One Block Type with Another
Change all blocks of one type in a region to a different type
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026Replaces only dirt blocks with stone in the specified region, leaving other blocks unchanged.
/fill ~-10 ~ ~-10 ~10 ~10 ~10 stone replace dirt48 characters
- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Paste the command with your desired block types.
- Press Enter — only matching blocks change.
Related commands
Set a Single Block
Place one block at a specific spot
Clear an Area (Fill With Air)
Delete a region of blocks by filling it with air
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
Replace One Block Type with Another
Swap every block of one type for another in a region
Place a Chest
Instantly place a chest at a specific location