/fill ~ ~ ~ ~10 ~10 ~10 minecraft:stone replaceSelected:
minecraft:stone
Only replace blocks of this type. Leave empty to replace all.
The /fill command fills a region between two corner coordinates with a block. It processes up to 32,768 blocks per execution. Use the fill mode to control how blocks already in the region are handled.
The /fill command fills a rectangular region between two corner coordinates with a specified block. This generator handles every block in Java Edition and supports five fill modes: destroy, hollow, keep, outline, and replace.
The syntax is /fill <from> <to> <block> [mode]. You define two opposite corners of a 3D box, pick a block, and choose how the fill behaves. The command processes up to 32,768 blocks per execution, roughly a 32x32x32 cube.
This is the go-to command for large-scale building: flatten terrain, create walls, lay floors, or clear entire chunks in a single command. For placing individual blocks, use the /setblock command. For duplicating existing structures, see the /clone command.
The fill mode controls how the command interacts with blocks already present in the target region. Choosing the right mode saves you from running multiple commands.
| Mode | Behavior | Use Case |
|---|---|---|
| replace | Replaces all blocks in the region (default). With a filter block, only replaces matching blocks. | Swapping materials, selective replacement |
| destroy | Replaces all blocks and drops them as items, with break particles and sound. | Demolition with item recovery |
| hollow | Creates an outer shell of the block, fills the interior with air. | Building rooms, hollow structures |
| outline | Creates an outer shell only, leaves interior blocks untouched. | Adding walls around existing content |
| keep | Only places blocks where air exists, never overwrites existing blocks. | Patching gaps, filling holes in terrain |
Hollow vs outline: these two are often confused. Hollow replaces the interior with air, which is great for making empty rooms. Outline leaves the interior untouched, which is great for wrapping an existing structure in a new material.
Clear large areas: /fill <pos1> <pos2> air replaces everything with air. Run it multiple times if the area exceeds the 32,768 block limit.
Flatten terrain: fill a wide, shallow region with grass_block to level out hilly ground for building.
Build instant walls: use two corners at the same X or Z value with a tall Y range to create a flat wall of any material, such as stone bricks.
Replace specific blocks: /fill <pos1> <pos2> stone replace dirt swaps only dirt blocks to stone, leaving everything else intact.
Create swimming pools: fill a region with water, then use hollow mode with a decorative block to add the pool walls around it.
The /fill command can process a maximum of 32,768 blocks per execution. If your selected region contains more blocks than this limit, the command will fail. For a cube, that is roughly a 32x32x32 area. For larger areas, split the fill into multiple commands.
Both create a shell of blocks, but hollow replaces the interior blocks with air, while outline only places the outer shell and leaves interior blocks untouched. Use hollow to create empty rooms; use outline to add a shell around existing content.
Use /fill <x1> <y1> <z1> <x2> <y2> <z2> air. This replaces every block in the region with air, effectively clearing it. Add the destroy mode if you want dropped items from the cleared blocks.
Yes. The replace mode accepts an optional filter block. For example, /fill <pos1> <pos2> stone replace dirt will only replace dirt blocks with stone, leaving all other blocks untouched.
Browse more Minecraft tools: