Gaminggaming

How To Use Fill Command In Minecraft

how-to-use-fill-command-in-minecraft

To use the fill command in Minecraft, you replace every block inside a rectangular region with a block of your choice. The process is straightforward once you know the exact syntax and have cheats enabled.

Step 1: Enable cheats in your Minecraft world

Cheats must be enabled for the fill command to work. This enables cheats temporarily for that session.

Step 2: Understand the fill command syntax

The basic syntax is /fill <from> <to> <block>. You need two sets of x y z coordinates that define opposite corners of the region you want to fill. To get these coordinates, press F3 (Java Edition) or check your coordinates in the settings (Bedrock Edition). Stand at one corner and note the numbers, then move to the opposite corner and note those numbers.

Step 3: Execute a basic fill command

  1. Press the T key to open the chat window.
  2. Type a command such as /fill ~ ~ ~ ~5 ~5 ~5 stone. The tilde (~) symbols mean relative to your current position, so this fills a 6x6x6 cube of stone starting at your feet.
  3. Press Enter to execute the command and watch the blocks appear.

Optional fill modes: hollow, outline, destroy, and more

The optional fillMode arguments modify how the blocks are placed. There are five modes: destroy, hollow, keep, outline, and replace. You add one of these keywords at the end of your command.

  • destroy replaces existing blocks and drops them as items. Use this when you want to collect the blocks you are removing.
  • hollow fills only the outer edge of the region, leaving the inside empty. This is useful for building rooms or containers.
  • outline replaces only the blocks on the outer edge of the region, leaving inner blocks untouched. This creates a wireframe of your shape.
  • keep replaces only air blocks inside the region, leaving any existing blocks in place. This is ideal for filling empty spaces without destroying what is already built.
  • replace lets you specify an additional block type to swap out. For example, /fill ~ ~ ~ ~10 ~10 ~10 stone replace dirt turns all dirt into stone within that area.

Practical tips for using the fill command

Use relative coordinates (~) to avoid needing absolute positions. For example, /fill ~ ~ ~ ~10 ~ ~10 fills a flat 11x11 square at your feet. Combine the fill command with command blocks for automation, such as setting up a repeating command block that refills a structure after an explosion. Use the air block to clear large areas quickly, like /fill ~ ~ ~ ~20 ~20 ~20 air to remove everything in a 21x21x21 cube.

Sources

The steps on this page were checked against the following documentation. Last verified 17 September 2026.

  1. Microsoft Learn — https://learn.microsoft.com/en-us/minecraft/creator/reference/content/commandsreference/example…
  2. Fandom — https://fandom.com
  3. Microsoft Learn — https://learn.microsoft.com/en-us/minecraft/creator/commands/commands/fill?view=minecraft-bedro…

About the author

Linnet Chan is a beacon of knowledge in the bustling tech hub of San Francisco, California. With her finger on the pulse of biometric technology, she navigates the intricate dance of advancement in the realm of personal security.

View all 72 articles by Linnet Chan  ·  Our editorial policy

Leave a Reply

Your email address will not be published. Required fields are marked *