What the Fill Command Does
The fill command in Minecraft when ready replaces all blocks in a rectangular area with a single block type. Instead of placing blocks one at a time, you type a command that fills a space — useful for clearing terrain, building walls, or creating flat platforms without hours of clicking.
The command works in Creative mode and Survival mode (if cheats are on), and it works the same way across Java Edition and Bedrock Edition, though the exact syntax differs slightly between them.
Key Takeaways
- The fill command requires two corner coordinates to define a rectangular box, then the block type you want to fill it with.
- You must enable cheats in your world settings before the command will work, even in Creative mode on some versions.
- The command runs when ready and cannot be undone, so double-check your coordinates before pressing Enter.
- You can use the fill command with modifiers like replace to only change certain blocks, or hollow to create empty boxes instead of solid ones.
Enabling Cheats in Your World
Before you can use any command, including fill, you must turn on cheats. In Java Edition, create a new world and toggle "Allow Cheats" to On in the world creation menu. If you already have a world without cheats, you cannot turn them on retroactively — you must create a new world.
In Bedrock Edition (Windows 10, Xbox, mobile), open your world settings, scroll to "Cheats" and turn on "set up Cheats". This works on existing worlds. Once cheats are on, press the forward slash key (/) to open the command bar at the top of the screen.
The Basic Fill Command Syntax
The fill command follows this pattern: /fill x1 y1 z1 x2 y2 z2 block_name
The first three numbers (x1 y1 z1) are the coordinates of one corner of your rectangle. The second three numbers (x2 y2 z2) are the coordinates of the opposite corner. The block_name is what you want to fill with — for example, stone, oak_log, or dirt. The command fills every block inside that box with your chosen block.
To find your coordinates, press F3 in Java Edition (or enable the coordinates display in Bedrock settings) and look at the numbers shown on screen. Stand at one corner of the area you want to fill, note the x, y, and z values, then move to the opposite corner and note those values too.
Using Replace to Change Only Certain Blocks
If you want to fill an area but only replace blocks of a specific type, add the word replace and the block you want to replace. For example: /fill 100 64 100 110 74 110 stone replace dirt will turn all dirt blocks in that box into stone, but leave other blocks untouched.
This is useful when you want to change the ground in a landscape without affecting trees, water, or structures already in the space. Without the replace modifier, the command would turn everything — trees, water, buildings — into stone.
Creating Hollow Boxes and Outlines
The hollow modifier creates an empty box instead of a solid one. Use it like this: /fill 100 64 100 110 74 110 stone hollow. This creates a stone box with empty space inside, useful for building walls or the frame of a structure without filling the interior.
You can also use outline in Bedrock Edition to create just the edges of a box without any fill at all. In Java Edition, there is no outline modifier — use hollow and then manually clear the interior if you need just the edges.
Common Mistakes and How to Avoid Them
The most common error is swapping x and z coordinates. Minecraft measures distance east-west as x and north-south as z. If your fill command fills the wrong area, you likely reversed these. Check your coordinates carefully before running the command.
Another mistake is forgetting that the fill command cannot be undone. If you fill a large area with the wrong block, you must use fill again to replace it back. Test on a small area first if you are unsure. Also, remember that the command fills the entire rectangular box, including the space between the two corners — it does not just draw a line or outline.
In Java Edition, block names use underscores (oak_log, dark_oak_wood) while in Bedrock they sometimes use colons (oak_log:0). Check the block name in your version before running the command, or you will get an error message and nothing will fill.
Filling Large Areas Efficiently
The fill command works when ready no matter the size, but very large fills (like 500 by 500 blocks) can cause lag or briefly freeze your game while it processes. If you are filling a massive area, break it into smaller commands — fill a 100 by 100 section, then another, rather than one 500 by 500 command.
You can also use the fill command multiple times in succession by pasting commands into the chat. Some players create a text file with multiple fill commands and paste them all at once to build complex structures faster than clicking would allow.
Frequently Asked Questions
Can I use the fill command in Survival mode without cheats?
No. The fill command only works when cheats are turned on. In pure Survival mode without cheats, you must place blocks manually. Turning on cheats disables achievements on that world in Java Edition, though Bedrock allows achievements even with cheats on.
What happens if I use the wrong coordinates?
The command will fill whatever rectangular area your coordinates define. If you fill the wrong space, use the fill command again with the same coordinates but a different block to replace it. There is no undo button, so always double-check before pressing Enter.
Can I fill with multiple block types at once?
No. A single fill command uses only one block type. To create a pattern with multiple blocks, you must run separate fill commands for different areas, or use a structure block or schematic tool (which require more setup).
Does the fill command work with special blocks like chests or furnaces?
Yes, but they will be empty. If you fill with furnaces, each furnace will have no fuel or items inside. You cannot use fill to place blocks with specific data (like a chest containing items). For that, you need structure blocks or commands like setblock.
How do I fill with air to clear an area?
Use /fill x1 y1 z1 x2 y2 z2 air. This removes all blocks in the box and leaves empty space. In Java Edition, you can also use cave_air for underground spaces, though air works everywhere.