How to Use the Fill Command in Minecraft: A Complete Guide

The Fill command in Minecraft is one of the most powerful tools available to builders and map makers. Instead of placing blocks one at a time, it lets you fill entire regions instantly — saving hours of manual work. Whether you're flattening terrain, building walls, or clearing large areas, understanding how Fill works opens up a completely different way to build.

What Is the Fill Command?

The Fill command is a cheat/console command that replaces every block in a defined rectangular region with a block of your choosing. It works in Java Edition and Bedrock Edition, though the exact syntax differs slightly between the two.

To use any command in Minecraft, you need to:

  • Have cheats enabled in your world (set during world creation, or toggled in LAN settings)
  • Open the chat window (default: T on PC, right on the d-pad on console)
  • Type your command starting with a forward slash /

Basic Fill Command Syntax

Java Edition

/fill <x1> <y1> <z1> <x2> <y2> <z2> <block> 

Bedrock Edition

/fill <x1> <y1> <z1> <x2> <y2> <z2> <tileName> 

The two sets of coordinates define opposite corners of the rectangular region you want to fill. Think of it like drawing a box — you give Minecraft the bottom-left-back corner and the top-right-front corner, and it fills everything in between.

Example:

/fill 10 64 10 20 70 20 stone 

This fills the rectangular region between those two coordinate pairs entirely with stone.

Using Relative Coordinates with Tilde (~)

You don't always want to type out absolute world coordinates. Minecraft supports relative coordinates using the tilde symbol (~), which means "relative to my current position."

/fill ~ ~ ~ ~10 ~5 ~10 planks 

This fills a region starting at your feet and extending 10 blocks in X, 5 blocks up in Y, and 10 blocks in Z. This is especially useful when you're standing at the corner of a build and want to work outward from there.

Fill Command Modes 🧱

The Fill command has optional fill modes that change how blocks are placed:

ModeWhat It Does
replaceReplaces all blocks in the region (default behavior)
destroyFills the region and drops all replaced blocks as items
hollowFills only the outer shell with the target block; interior becomes air
outlineSame as hollow, but leaves the interior untouched
keepOnly fills blocks that are currently air

How to Use a Fill Mode

Append the mode at the end of the command:

/fill 0 64 0 20 80 20 glass hollow 

This creates a hollow glass box — walls, floor, and ceiling — with an empty interior.

The keep mode is particularly useful for adding detail to existing structures without overwriting anything you've already built.

Replacing a Specific Block Type

You can tell the Fill command to only replace a specific block, leaving everything else untouched. This uses the replace mode with an extra argument:

Java Edition:

/fill <x1> <y1> <z1> <x2> <y2> <z2> <newblock> replace <oldblock> 

Example:

/fill 0 60 0 50 70 50 air replace water 

This removes all water in the region and replaces it with air — a common trick for draining lakes or flooded areas.

Practical Uses for the Fill Command

Understanding the syntax is one thing — knowing when to reach for Fill is what makes it genuinely useful:

  • Clearing land: Fill a large region with air to remove trees, terrain, or old builds instantly
  • Creating flat platforms: Fill a layer of coordinates with a single block to build a foundation
  • Building walls and floors: Use hollow to frame out rooms without filling the interior
  • Removing liquids: Replace water or lava across a region using the replace filter
  • Resetting terrain: Overwrite a section of a build that went wrong
  • Map making: Create large-scale structures like arenas, roads, or dungeons in seconds

Common Errors and What They Mean

The Fill command won't always run silently. Here are the most common issues:

"Cannot place block outside of the world" — One of your coordinates is outside the valid build height (in Java Edition, Y ranges from -64 to 320 in most worlds).

"That position is out of the world" — Similar boundary issue, common in Bedrock Edition.

"Too many blocks in the specified area" — Minecraft limits Fill to 32,768 blocks per command. If your region is larger, you'll need to split it into multiple commands.

Command not working at all — Cheats may not be enabled in your world, or you may not have operator permissions on a server.

Variables That Affect How Fill Behaves ⚙️

Fill isn't one-size-fits-all. Several factors shape how useful it is in practice:

  • Edition (Java vs Bedrock): Block names and some syntax details differ — oak_planks in Java may behave differently than planks in Bedrock
  • World height: Newer Java worlds have a much larger Y-range than older ones, affecting coordinate planning
  • Server permissions: On multiplayer servers, Fill typically requires operator (OP) status
  • Block state knowledge: Advanced use involves block states (like specifying which direction a stair faces), which requires familiarity with Minecraft's block data system
  • World size and performance: Filling very large regions can cause lag or chunk loading issues, especially on lower-end hardware or busy servers

Beginners working in creative mode on a local world have far fewer constraints than someone trying to use Fill in a multiplayer survival server — the same command means a very different experience depending on the environment.