/fill Command
Fills a 3D rectangular region (up to 32,768 blocks) with the specified block. destroy drops existing blocks; hollow fills only the outer shell and clears the interior with air; keep only fills air blocks; outline fills only the outer shell leaving the interior intact; replace (optionally filtered to a specific block type) silently overwrites; strict fills without triggering block-updates or shape-updates (Java 1.21.5+).
Syntax
/fill <from: x y z> <to: x y z> <block> [destroy|hollow|keep|outline|replace [<filter>]|strict]Permission: 2Edition: Both
Examples
/fill -10 60 -10 10 80 10 minecraft:air replace/fill ~-5 ~ ~-5 ~5 ~10 ~5 minecraft:glass hollow/fill 0 64 0 50 64 50 minecraft:grass_block replace minecraft:dirt/fill ~-3 ~-1 ~-3 ~3 ~5 ~3 minecraft:oak_planks outlineNotes
Maximum volume is 32,768 blocks in Java; Bedrock shares the same cap. The strict mode is Java only (1.21.5+). In Java the replace subcommand's filter is a block predicate; in Bedrock it is a block name with optional states.