/fill
Fills a region between two coordinates with a specified block. Supports various fill modes and optional filtering.
Overview
Fills a region between two coordinates with a specified block. Supports various fill modes and optional filtering. In vanilla Minecraft Java Edition it is one of the world commands and has been available since version 1.0.
It is invoked as /fill and accepts 3 required arguments (
The maximum fill volume is 32768 blocks (e.g., 32x32x32). Larger operations must be done in multiple commands. Hollow mode replaces interior blocks with air; outline does not.
A single /fill may not exceed 32768 blocks (for example 32x32x32); larger regions must be split across several commands.
hollow replaces the interior with air, whereas outline leaves whatever is already inside untouched.
Syntax & Arguments
/fill <from> <to> <block> [destroy|hollow|keep|outline|replace] [<filter>]The full syntax is /fill . Angle brackets < > mark required arguments and square brackets [ ] mark optional ones; a vertical bar | between words means you pick exactly one of those literals. You must always supply
- from
- Required, of type a block_pos. The first corner of the fill region.
- to
- Required, of type a block_pos. The second corner of the fill region.
- block
- Required, of type a block_state. The block to fill the region with.
- mode
- Optional, of type a literal. destroy = drops items; hollow = fill outer shell only, inside becomes air; keep = only replace air; outline = fill outer shell only; replace = replace with optional filter.
- filter
- Optional, of type a block_predicate. When using replace mode, only replace blocks matching this filter.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| from | block_pos | Required | The first corner of the fill region. |
| to | block_pos | Required | The second corner of the fill region. |
| block | block_state | Required | The block to fill the region with. |
| mode | literal | Optional | destroy = drops items; hollow = fill outer shell only, inside becomes air; keep = only replace air; outline = fill outer shell only; replace = replace with optional filter. |
| filter | block_predicate | Optional | When using replace mode, only replace blocks matching this filter. |
Examples
The 3 examples below are ready to copy and adapt. For instance, /fill ~ ~ ~ ~10 ~10 ~10 stone fills an 11x11x11 region starting from your position with stone. Each example varies the arguments to show a different real use of /fill; read the note under every snippet to see exactly what changes.
/fill ~ ~ ~ ~10 ~10 ~10 stoneFills an 11x11x11 region starting from your position with stone.
/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 oak_planks replace grass_blockReplaces all grass blocks with oak planks in a flat 11x1x11 area below you.
/fill 0 60 0 20 70 20 air hollowCreates a hollow air box (effectively a room) from 0,60,0 to 20,70,20.
Permission Level & Requirements
/fill sits at permission Level 2 - Game Master / Cheats, which means it needs permission level 2, the level cheats grant to single-player worlds and that operators hold by default.
In a single-player world you must have "Allow Cheats" turned on (or open the world to LAN with cheats) before it will run; on a multiplayer server the player needs to be an operator at the matching level.
This reference describes the Java Edition 1.21 form of the command; Bedrock Edition may use slightly different argument formats.
Common Mistakes
- Exceeding the 32768-block fill limit, the region cannot contain more than 32768 blocks.
- Confusing 'hollow' and 'outline', hollow fills the inside with air while outline leaves the inside untouched.
Notes
The maximum fill volume is 32768 blocks (e.g., 32x32x32). Larger operations must be done in multiple commands. Hollow mode replaces interior blocks with air; outline does not.
Related Commands
If /fill is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /setblock, /clone, and /forceload. They cover closely related tasks, so the links above jump straight to each one.
Frequently Asked Questions about /fill
What does the /fill command do in Minecraft?
Fills a region between two coordinates with a specified block. Supports various fill modes and optional filtering. It belongs to the world command group and was added in Java Edition 1.0.
What is the correct syntax for /fill?
/fill
What permission level does /fill need?
It requires permission Level 2 - Game Master / Cheats. On a server the player must be an operator at that level, or have cheats enabled in single-player.
What is a common mistake when using /fill?
Exceeding the 32768-block fill limit, the region cannot contain more than 32768 blocks.
Can you give an example of /fill in use?
Yes. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 oak_planks replace grass_block — replaces all grass blocks with oak planks in a flat 11x1x11 area below you.
What is the block limit for /fill?
32768 blocks per command. A region with more blocks than that is rejected, so break very large areas into multiple /fill calls or use /clone.
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting