Use /fill to replace one block type across a region. In Bedrock Edition, the basic pattern is /fill <x1> <y1> <z1> <x2> <y2> <z2> <new_block> replace <old_block>. The two coordinate points define the region; the final block name limits which blocks are changed.
Replace a block type across an area
In Bedrock Edition, Microsoft documents this example, which replaces dirt with grass blocks in a region:
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Minecraft - Nintendo Switch | $29.83 | Buy on Amazon |
| 2 |
|
Minecraft: Switch Edition | $32.65 | Buy on Amazon |
| 3 |
|
Minecraft Legends Deluxe Edition | $49.00 | Buy on Amazon |
| 4 |
|
Minecraft | Standard Edition | XBOX Digital Code | $19.99 | Buy on Amazon |
| 5 |
|
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code | $39.99 | Buy on Amazon |
/fill 0 64 0 10 64 10 grass_block 0 replace dirt
To adapt it, change the two coordinate triples to the region’s endpoints, grass_block to the block you want to place, and dirt to the block you want to replace. The example includes 0 as a block-state argument; identifiers and accepted syntax can vary by edition and release. Use the form accepted by your game. Microsoft’s Bedrock /fill reference documents the command and its options.
What each part of the command does
/fillapplies a block operation to a region.<x1> <y1> <z1>and<x2> <y2> <z2>are the two opposite endpoints. The command affects the volume between them.<new_block>is the block to place.replaceselects replacement mode.<old_block>is the block type to match, so other block types in the region are not the target of this replacement.
For example, change the final two block names to replace stone with glass, while keeping the coordinates and edition-specific syntax valid for your game.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- Minecraft is a game about placing blocks and going on adventures
- Explore randomly generated worlds and build amazing things from the simplest of homes to the grandest of castles
- Play in creative mode with unlimited resources or mine deep into the world in survival mode, crafting weapons and armor to fend off the dangerous mobs
- Play on the go in handheld or tabletop modes
- Includes Super Mario Mash-Up, Natural Texture Pack, Biome Settlers Skin Pack, Battle & Beasts Skin Pack, Campfire Tales Skin Pack; Compatible with Nintendo Switch only
Choose the right command and fill mode
Use /fill for a region
/fill changes blocks across an area. In Bedrock, the documented modes include destroy, hollow, keep, outline, and replace. Microsoft describes replace as changing blocks without dropping the replaced blocks; keep targets air blocks, while destroy removes existing blocks. Choose replace when you want to match a particular old block type. See Microsoft’s mode descriptions.
Use /setblock for one position
If you only need to change a single block, use /setblock instead. Microsoft’s command reference describes /setblock as changing one block and /fill as changing blocks in a region. Microsoft’s command introduction covers both.
Rank #2
- Explore randomly-generated worlds and build amazing things from the simplest of homes to the grandest of castles
- Play in Creative Mode with unlimited resources or mine deep into the world in survival mode, crafting weapons and armour to fend off the dangerous mobs
Bedrock and Java syntax are not interchangeable by assumption
The example and full syntax above are from Microsoft’s Bedrock Edition documentation; they are not confirmation of the exact syntax for every Java release. Mojang’s Java Edition 25w02a snapshot notes that replace ceased to be the final option and could be followed by additional options. That documents a change in that snapshot, not the complete syntax for the specific current Java release you may be playing. Check the command help and syntax in your target release. Mojang’s 25w02a notes.
Check the command before running it
- Verify both endpoints so the region covers only the intended area.
- Check that the new and old block identifiers are accepted by your edition and version.
- In Bedrock, enable cheats or otherwise ensure you have command permission; Microsoft lists cheats as required for
/fill. - If the command is rejected, try
/help fillin Bedrock to see the usage and syntaxes available in-game. - For a large region or a destructive mode, try a smaller area first or preserve a copy of the world.
Microsoft’s Bedrock reference gives the permission and fill-mode details, while its command introduction explains in-game help. Bedrock command documentation.
Quick Recap
Best Value
- DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
Rank #4
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
- SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
- COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




