/fill command
The /fill command fills a rectangular area (a cuboid) with the block of your choice. It has five modes: replace, destroy, hollow, outline and keep. It's the go-to tool for fast building and terrain editing.
Syntax
Java and Bedrock Edition
/fill <x1 y1 z1> <x2 y2 z2> <block> [mode] Parameters in <angle brackets> are required. Parameters in [square brackets] are optional.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| x1 y1 z1 | coordinates | Yes | The first corner of the cuboid. Absolute or relative (~) coordinates. |
| x2 y2 z2 | coordinates | Yes | The opposite corner of the cuboid. The order of the corners doesn't matter. |
| block | block ID | Yes | The block to place. It can include block states, for example oak_stairs[facing=east,half=top]. |
| mode | replace|destroy|hollow|outline|keep | No | The fill mode. Defaults to "replace". The hollow mode builds a box, outline fills only the outer layer, keep doesn't overwrite existing blocks, and destroy breaks blocks so they drop as items. |
Usage examples
Tips and tricks
The /fill limit is 32,768 blocks at once (a 32x32x32 cube). For bigger areas, use several /fill commands or a data pack with a loop.
The destroy mode breaks blocks as if they were mined with a tool, with drops and particle effects. Over large areas, it can cause lag from hundreds of thousands of dropped items.
Use /fill ... air to clear terrain quickly, but remember: there's no undo. Back up your world before big operations.
Combine /fill with /execute to fill areas relative to each entity. It's a powerful tool for adventure maps and server events.
Related commands
/setblock
Places a single block at a given position. A simpler version of /fill for precise changes. Three ...
/clone
Copies a rectangular area of blocks from one place to another. Three mask modes (filtered, masked...
/execute
The most powerful command in Minecraft. It runs other commands in a modified context: as another ...
/fillbiome
Changes the biome in a chosen area without touching the blocks. The new biome affects things like...
Frequently asked questions
How do you use the /fill command in Minecraft?
Open the chat with the T or / key and type the command using this syntax: /fill <x1 y1 z1> <x2 y2 z2> <block> [mode]. The /fill command fills a rectangular area (a cuboid) with the block of your choice. It has five modes: replace, destroy, hollow, outline and keep. It's the go-to tool for fast building and terrain editing.
What permissions does /fill require?
The /fill command requires permission level 2: Operator (OP 2). In singleplayer with cheats turned on, you automatically have full permissions. On a multiplayer server, you need operator status, which is granted with the /op command.
Does /fill work in Bedrock Edition?
Yes, the /fill command works in both Java Edition and Bedrock Edition, with similar syntax.



