Skip to main content
MC COMMANDS logoMC COMMANDS
Command Reference

Minecraft /fill Command

worldJavaBedrock

Fills a 3D cuboid region between two coordinates with a specified block, supporting replace filters, hollow rooms, outer wall outlines, and destruction.

Version Compatibility

Java Edition:1.21.4 (1.13+)
Bedrock Edition:1.21.60

Command Syntax

Java Edition/fill <from> <to> <block>[<states>] [destroy|hollow|keep|outline|replace] [<filter>]
Bedrock Edition/fill <from> <to> <tileName> [tileData|blockStates] [replace|destroy|hollow|keep|outline] [<replaceTileName>]

Arguments Explained

Practical Examples

beginnerBoth
/fill ~-10 ~-1 ~-10 ~10 ~-1 ~10 minecraft:stone_bricks

Creates a 21x21 stone brick floor directly beneath your feet.

Fast foundation platform builder.

intermediateBoth
/fill ~-5 ~ ~-5 ~5 ~8 ~5 minecraft:glass hollow

Creates an 11x9x11 hollow glass room with an empty interior.

Instant greenhouse or underwater shelter.

intermediateBoth
/fill ~-15 ~-3 ~-15 ~15 ~15 ~15 minecraft:air replace minecraft:water

Drains water from an ocean or cave area without affecting stone or sand.

Clearing flooded structures.

intermediateBoth
/fill ~-20 ~-5 ~-20 ~20 ~15 ~20 minecraft:air replace

Clears a massive 41x21x41 volume into empty air without spawning laggy item entities.

Terrain clearing for large-scale creative builds.

beginnerBoth
/fill ~-4 ~ ~-4 ~4 ~4 ~4 minecraft:oak_planks outline

Constructs the outer walls, floor, and ceiling of a cube without altering the interior.

Frame building without overwriting pre-placed furniture.

Advertisement

Common Mistakes

Mistake:

Exceeding the 32,768 block volume limit (e.g. filling a 35x35x35 cube is 42,875 blocks)

Fix:

Divide the volume into smaller coordinate chunks or vertical layers.

Mistake:

Using destroy mode on large volumes, generating thousands of floating items and crashing TPS

Fix:

Use "air replace" instead of "destroy" to delete blocks cleanly without item drops.

Mistake:

Forgetting that coordinates are inclusive: ~ ~ ~ to ~10 ~ ~ fills 11 blocks, not 10

Fix:

Remember the starting block counts as 1. For a 10-wide wall, offset by +9.

Command Block Usage & Automation

Connect an Impulse command block to an arena reset button: "/fill 100 64 100 120 64 120 stone_bricks replace air" to regenerate the floor after each battle, or clear hazardous lava puddles during puzzle runs.

Automation Tip: Command blocks require Operator permissions (permission level 2+) and cheats enabled. In Java Edition, command blocks can execute commands up to 32,767 characters long compared to the 256-character player chat limit.

Useful Tips

  • Use hollow mode to instantly generate houses or protective bubbles around yourself.

  • Use keep mode to fill in holes, caves, or ravines without destroying pre-existing structures.

  • Combine relative coordinates ~ with negative offsets (e.g. ~-5 ~-1 ~-5 to ~5 ~-1 ~5) to center floors around your avatar.

Important Notes

Minecraft enforces a hard limit of 32,768 blocks per /fill command execution to prevent server crashes. To fill larger zones, split the coordinates into multiple adjacent slices.

Frequently Asked Questions

Ready to build your command?

Use our interactive generator to create error-free /fill commands with a visual interface.

Open Command Generator
Advertisement