Minecraft Fill Command: Replace, Hollow and Build With Blocks
The Minecraft /fill command places a chosen block throughout a rectangular region. In a world where you have command permissions, /fill 0 64 0 4 66 4 stone fills the region between two corner coordinates with stone. You can also make hollow structures, replace selected block types or clear an area with air. Use a copy of your world first: /fill can overwrite a large amount of work instantly.
Minecraft fill command examples
| What you want | Example command |
|---|---|
| Solid stone box | /fill 0 64 0 4 66 4 stone |
| Hollow glass box | /fill ~-3 ~ ~-3 ~3 ~4 ~3 glass hollow |
| Clear a small area | /fill 0 64 0 4 66 4 air |
| Replace dirt with grass blocks (Java-style example) | /fill 0 64 0 10 64 10 grass_block replace dirt |
Examples illustrate intent and may require edition-specific adjustment. Microsoft’s current Bedrock reference provides additional block-state arguments for some replace operations. Game updates can alter valid block IDs or optional syntax, so rely on your edition’s command suggestions for final spelling.
Step-by-step: fill a region safely
- Make a backup or duplicate world. Avoid testing destructive commands in an irreplaceable build.
- Turn on cheats or obtain suitable server permissions. Microsoft’s Bedrock introduction notes that enabling cheats disables achievements in that world.
- Choose two opposite corners of a cuboid region and record their X, Y and Z values.
- Open chat, type your fill command using the corners and a valid block identifier, then run it.
- Inspect the result; if it is wrong, restore your backup or make a carefully scoped correction.
Need help finding the numbers? Our Minecraft coordinates guide explains X, Y and Z in both main editions.
How the coordinates work
Fill uses two sets of three coordinates, not a starting point plus dimensions. The first three numbers describe one corner, while the next three describe the opposite corner. Minecraft fills all positions inside the inclusive bounding box. That means a region from X=0 to X=4 spans five block columns, not four. A 5-by-3-by-5 region covers 75 block positions before any replacement rules are applied.
Using the tilde (~) for relative regions
Relative coordinates are helpful when building near your current position. For example, Microsoft’s published Bedrock guide uses /fill ~-5 ~ ~-5 ~5 ~3 ~5 stone to fill a region around the player. Tildes make commands portable, but they also mean that moving your position changes the target area. Pause before running a relative command if there are chests, farms or rare structures nearby.
Solid, hollow, outline and replace
| Mode | Meaning |
|---|---|
| Default solid fill | Places the specified block throughout the region |
| hollow | Builds the outer boundary and clears its inside |
| outline | Changes the boundary while leaving the interior unchanged |
| replace | Replaces blocks, optionally filtering for a particular existing block |
| destroy | Destroys replaced blocks, with item behavior depending on the command and edition |
The optional modes have similarities across editions but not every historical Java example copies directly into Bedrock. Refer to the current Microsoft syntax documentation or your Java version’s built-in suggestions rather than assuming an older numeric block data value still works.
Why /fill says too many blocks or too big an area
Minecraft limits command operation size and may reject overly large regions. The precise limits can change by edition, configuration and version; do not trust a hardcoded old figure. Divide the region into smaller, controllable sections. Smaller edits also make it easier to undo mistakes manually or restore a local backup.
Common errors
- Unknown command: ensure command permissions are enabled and that you entered
/fillcorrectly. - Invalid block: type a documented block identifier and use autocomplete when available.
- Wrong coordinates: verify the two corners and the dimensions before executing.
- Unexpected damage: check whether the area contained valuable builds. Restore a backup if needed.
- Different behavior on Java: consult version-specific Java command syntax instead of blindly copying Bedrock examples.
Frequently asked questions
Can I use /fill in Survival?
Commands require permissions, and Bedrock requires cheats for this command. Your gameplay mode alone does not grant unrestricted commands.
How do I make a hollow cube?
Add a supported hollow fill mode after the block identifier. Microsoft’s Bedrock documentation includes a hollow glass-box example.
Is there an undo command?
Do not assume there is a universal one-click undo for vanilla /fill. Back up the world before large edits.
Can I automate fills?
Command blocks can execute supported commands under the right permissions. See our Creative mode guide for safe setup.
Official sources: Microsoft Bedrock /fill Command and Introduction to Commands. This article does not claim first-hand testing.
