/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, first added in 1.8.
It is invoked as /fill <from> <to> <block> [destroy|hollow|keep|outline|strict|replace [<filter>]] and accepts 3 required arguments (<from>, <to>, and <block>) and 2 optional arguments ([mode] and [filter]).
By default one fill can change at most 32768 blocks (e.g., 32x32x32); the max_block_modifications game rule sets that limit, and before Java 1.21.11 it was called commandModificationBlockLimit. Hollow mode replaces interior blocks with air; outline does not.
By default a single /fill can change at most 32768 blocks (for example 32x32x32). The max_block_modifications game rule sets that limit, so a server owner can raise it.
hollow replaces the interior with air, whereas outline leaves whatever is already inside untouched.
Syntax & Arguments
/fill <from> <to> <block> [destroy|hollow|keep|outline|strict|replace [<filter>]]The full syntax is /fill <from> <to> <block> [destroy|hollow|keep|outline|strict|replace [<filter>]]. 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>, <to>, and <block>. The arguments [mode] and [filter] may be omitted, in which case the documented default applies.
- 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; strict = place without block or shape updates.
- 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; strict = place without block or shape updates. |
| 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
- Going over the block limit: by default one /fill can change at most 32768 blocks, set by the max_block_modifications game rule.
- Confusing 'hollow' and 'outline', hollow fills the inside with air while outline leaves the inside untouched.
Notes
By default one fill can change at most 32768 blocks (e.g., 32x32x32); the max_block_modifications game rule sets that limit, and before Java 1.21.11 it was called commandModificationBlockLimit. 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 first added in Java Edition 1.8.
What is the correct syntax for /fill?
/fill <from> <to> <block> [destroy|hollow|keep|outline|strict|replace [<filter>]]. The required arguments are from, to, and block, and the optional ones are mode and filter.
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?
Going over the block limit: by default one /fill can change at most 32768 blocks, set by the max_block_modifications game rule.
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 by default. A bigger region is rejected, so split it into several /fill commands or raise the max_block_modifications game rule, which also limits /clone and /fillbiome.
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting