News
Game
Guides
Downloads
Versions
/fill
COMMANDS BUILDING CHEATS · LEVEL 2 Added in 1.14 or earlier

/fill command in Minecraft

/fill places one block type in every position of a cuboid between two corners. It builds floors, walls and hollow rooms in one line, clears terrain with air, or swaps one block for another with the replace mode.

Syntax

/fill <from> <to> <block> [destroy|hollow|keep|outline|replace|strict]
ArgumentExpectsWhat it does
fromBlock coordinates (x y z)First corner of the area, absolute like 0 64 0 or relative like ~-5 ~ ~-5.
toBlock coordinates (x y z)Opposite corner of the area. Both corners are included in the volume.
blockBlock with statesBlock to place, with optional states and data, for example minecraft:oak_stairs[facing=north].
filteroptionalBlock testAfter replace: only blocks matching this ID or tag are changed, such as minecraft:dirt or #minecraft:logs.
All 12 forms
  • /fill <from> <to> <block>
  • /fill <from> <to> <block> destroy
  • /fill <from> <to> <block> hollow
  • /fill <from> <to> <block> keep
  • /fill <from> <to> <block> outline
  • /fill <from> <to> <block> replace
  • /fill <from> <to> <block> replace <filter>
  • /fill <from> <to> <block> replace <filter> destroy
  • /fill <from> <to> <block> replace <filter> hollow
  • /fill <from> <to> <block> replace <filter> outline
  • /fill <from> <to> <block> replace <filter> strict
  • /fill <from> <to> <block> strict

Examples

A stone floor under you

/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:stone

Lays an 11 × 11 floor of Stone one block below your feet.

Java 26.3

Clear the area around you

/fill ~-10 ~ ~-10 ~10 ~10 ~10 minecraft:air

Replaces everything around you with air, 21 × 11 × 21 blocks.

Java 26.3

A hollow glass room

/fill ~-4 ~ ~-4 ~4 ~5 ~4 minecraft:glass hollow

Builds a glass box with air inside, with you standing in the middle.

Java 26.3
A hollow Glass box placed in one go: only the walls, floor and ceiling are filled, the inside stays empty Scene setup: Taken with /fill ~ ~ ~ ~10 ~5 ~10 minecraft:glass hollow (11 × 6 × 11 blocks, 402 Glass blocks); this example builds a 9 × 6 × 9 room. In-game screenshot · Java Edition 26.3

Swap dirt for stone

/fill ~-15 ~-5 ~-15 ~15 ~5 ~15 minecraft:stone replace minecraft:dirt

Only Dirt blocks in the area become stone; everything else stays.

Java 26.3

Wool walls around a plot

/fill 0 64 0 9 70 9 minecraft:white_wool outline

Builds the outer shell in White Wool and keeps whatever is inside.

Java 26.3
Interactive tool

Command generator

Fill in the fields, copy the command, paste it in the chat. Syntax checked against Java Edition 26.3.

Turn on JavaScript to use the interactive version.

/fill ~-5 ~-1 ~-5 ~5 ~4 ~5 stone hollow

Calculated from the Java Edition 26.3 game files

Volume limit

One command changes at most 32,768 blocks by default, for example 32 × 32 × 32. The limit is the max_block_modifications game rule (/gamerule). Above it, the game answers "Too many blocks in the specified area (maximum 32768, but specified 35937)". Both corners are included: from 0 0 0 to 9 0 9 is 10 × 1 × 10, so 100 blocks. The whole area must be loaded.

The modes

  • replace (default): replaces everything, or only the blocks matching the filter.
  • keep: only fills air.
  • destroy: breaks the old blocks and drops them as items.
  • hollow: builds the outer shell and fills the inside with air.
  • outline: builds the shell and leaves the inside untouched.
  • strict: places the blocks without triggering block updates.

Tips for /fill

Block states go in brackets, such as oak_stairs[facing=north]. The filter accepts tags, for example #minecraft:logs. A hollow Glass box makes a quick viewing room, and a floor of Stone levels a plot. For a single block, /setblock is enough; to copy a build, use /clone; to change the biome of the same area, use /fillbiome.

✓ Checked in Java Edition 26.3 · updated 2 November 2026

/fill: FAQ

What is the maximum size of /fill?

By default 32,768 blocks per command, set by the max_block_modifications game rule. Split larger areas into several commands or raise the rule.

How do I clear an area with /fill?

Fill it with minecraft:air, for example /fill ~-10 ~ ~-10 ~10 ~10 ~10 minecraft:air. Add destroy if you want the blocks to drop.

How do I use /fill?

Type it in the chat with cheats on: /fill <from> <to> <block> [destroy|hollow|keep|outline|replace|strict].

Who can use /fill?

Cheats on, or operator level 2.

Copy & paste lists with /fill

Related commands

/setblockCheats/cloneCheats/placeCheats/fillbiomeCheats