Replace One Block Type with Another
Change all blocks of one type in a region to a different type
⚠︎ Awaiting in-game verification for Java 26.2Replaces 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
Delete a region of blocks by filling it with air
/fill ~ ~ ~ ~10 ~10 ~10 airCreate 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 waterSwap every block of one type for another in a region
/fill ~ ~ ~ ~10 ~10 ~10 stone replace dirt