/fill Command in Minecraft: Full Java & Bedrock Guide
If you have ever tried to build a large wall, a hollow room, or a giant circle in Minecraft one block at a time, you already know how slow that gets. The /

If you have ever tried to build a large wall, a hollow room, or a giant circle in Minecraft one block at a time, you already know how slow that gets. The /fill command in Minecraft solves that problem by filling an entire region with a chosen block in a single command.
Once you understand how it actually works, it becomes one of the most useful tools in your entire building workflow.
In this guide, we will break down exactly how the /fill command works in both Java and Bedrock Edition, cover every fill mode with real examples, walk through the most common errors players run into (and how to fix them) and show you how this command connects directly to structures like circles, domes, and spheres.
What Is the /fill Command in Minecraft?

The /fill command is a built-in Minecraft command that fills a cuboid-shaped region with a specified block. Instead of placing blocks one at a time, you define two coordinate points that act as opposite corners of a box, and Minecraft fills everything between them.
It is different from /setblock, which only places a single block at one location. If you are working with Minecraft command blocks, functions, or just trying to speed up manual building, /fill is usually the command you reach for first, while /setblock is reserved for precision placement of individual blocks.
Both commands require cheats to be turned on in your world, and you can run them either directly in the chat window or inside a command block for repeated or automated use.
/fill Command Syntax in Java Edition
The basic Java Edition syntax looks like this:
/fill <x1> <y1> <z1> <x2> <y2> <z2> <block> [mode]
A simple working example:
/fill 10 64 10 20 70 20 glass
This fills an 11x7x11 region with glass, replacing whatever was there before. The size comes from end minus start plus one on each axis (20-10+1 = 11, 70-64+1 = 7), which is worth remembering since it is a common source of miscounted builds.
You can also use tilde notation (~) to base coordinates on your current position instead of typing exact numbers. For example, ~ ~ ~ means your current location, and ~5 ~0 ~5 means five blocks away in the x and z direction at the same height.
How /fill Differs Between Java and Bedrock?
The /fill command works slightly differently between Java and Bedrock Edition. The core syntax is similar, but the mode parameter, block ID handling, and a few edition-specific commands around it are not identical.
Feature | Java Edition | Bedrock Edition |
Mode parameter | Plain keyword, e.g. hollow, replace | Uses oldBlockHandling as the parameter name |
strict mode | Available | Not available |
Block IDs | Namespaced, e.g. minecraft:stone | Accepts both minecraft:stone and shorter forms like stone in most commands |
Loading a distant area before filling | /forceload | /tickingarea |
A Bedrock example using the same structure:
/fill 10 64 10 20 70 20 minecraft:glass
Bedrock supports namespaced IDs like minecraft:stone, and also accepts shorter IDs like stone in most commands, so you generally do not need to worry too much about which form you use as long as the block name itself is correct.
For a deeper breakdown of how these two versions differ beyond just this command, our guide on Java vs Bedrock in Minecraft covers the wider differences you will run into while building.
Minecraft /fill Modes Explained
This is the part most tutorials skip over, and it is where most of the actual power of the command lives.
replace (default mode) Only the blocks inside the region are swapped for the new block; nothing else changes.
This is what runs automatically if you do not specify a mode.hollow Fills the outer shell of the region and replaces the interior with air. This is the fastest way to drop a room frame or a shell structure in one command.
/fill 0 64 0 20 74 20 dark_oak_planks hollow
That single line creates a 21x11x21 wooden shell (20-0+1 by 74-64+1 by 20-0+1) that you can immediately walk into and decorate.
outline Replaces only the boundary blocks, leaving the interior untouched. This is useful when you want to enclose something that already exists without disturbing what is inside.
keep Only fills air blocks and leaves every existing block untouched. Good for adding blocks into empty space without risking overwriting a build you already have.
destroy Removes the existing blocks in the region and can produce their normal block drops, similar to mining them by hand, before placing the new block. Use this carefully since it can generate a lot of dropped items.
strict (Java Edition) Places blocks exactly as specified without triggering block or shape updates. This matters in technical builds, such as redstone contraptions or precise structures, where an unwanted block update could change a neighboring block's state. This mode is not available in Bedrock Edition.
Replacing One Block Type Inside a Region
If you only want to swap one specific block type for another inside a region, without touching anything else, the replace syntax accepts a second block:
/fill 0 64 0 20 64 20 stone replace dirt
This only changes dirt blocks to stone inside that region. Everything else in the area stays exactly as it was. If you need to replace only one block type inside a region, /fill can do this with replace mode, which is often simpler than clearing and rebuilding an area from scratch.
Understanding the Block Count Limit

The maximum region size a single /fill command can affect depends on the edition and version you are playing. In Java Edition, this is controlled by the commandModificationBlockLimit gamerule, which defaults to 32,768 blocks but can be raised or lowered by a server operator. In Bedrock Edition, the limit is fixed and cannot be changed through a gamerule.
If your region goes over the limit, the command fails outright rather than filling part of it. The practical fix is to split one large fill into several smaller /fill commands run one after another, usually by breaking the structure into horizontal layers.
Common /fill Command Errors and How to Fix Them?
Based on real reports from players across Java and Bedrock, these are the errors you are most likely to run into:
"That position is out of this world!" This means your Y coordinate is outside the build height limit.
Check if your Y coordinate is within the current world height limit for your edition and version, since this range has changed across updates and differs between Java and Bedrock.
Command runs but nothing changes If you fill air with air, or use replace mode on a block that does not exist in the region, the command succeeds but reports zero blocks changed. This is not a bug, it just means there was nothing to replace.
Fill fails in an unloaded area Trying to fill a region that is not currently loaded can fail. In Java Edition, use /forceload to load the target chunks first. In Bedrock Edition, use /tickingarea add to load the target area before running the fill.
Syntax error with numeric data values on Bedrock Older commands like concrete 2 no longer work on modern Bedrock versions. Numeric data values were replaced with block states, so you now need the newer state-based format instead of the old numeric one.
"No such block with name" This usually means a typo or an outdated block ID. Double-check the exact block name for your current game version if a command that used to work suddenly throws this error.
A Caveat Worth Knowing: Block Entity Data
One thing that catches even experienced builders off guard is that replacing a block can remove the block entity data of the previous block. Be careful around chests, furnaces, hoppers and brewing stands filling over one of these can wipe its stored items or progress, even if the new block placed is technically the same type.
Using /fill Inside Command Blocks and Functions

The /fill command is not limited to typing in chat. It works inside command blocks for repeatable automation, and inside .mcfunction files for datapacks. A common example is a repeating command block that clears a small area of air around a player as they move:
/execute as @p at @s run fill ~1 ~2 ~1 ~-1 ~0 ~-1 air
If you are experimenting with Minecraft command blocks for the first time, start with a simple single fill command block before moving into repeating or chained setups, since debugging a repeating command block that is misfiring is much harder than fixing a one-time command.
Using /fill to Build Circles, Domes, and Spheres
This is where the /fill command becomes genuinely powerful for builders. On its own, /fill only creates straight-edged boxes; it has no idea what a circle or a curve looks like.
That is exactly why tools like our Minecraft Circle Generator exist. The generator calculates the block-by-block layout of a circle, oval, or sphere for you, and you can then use /fill commands layer by layer to place that shape far faster than clicking block by block.
Once you generate a circular blueprint, you can fill each horizontal ring using a short /fill command rather than placing every single block manually. This becomes especially useful once you move into larger builds, which our Minecraft sphere generator guide covers in more depth.
The same approach works well for rounded architectural pieces too. If you want to see it applied to a specific build, check out our Minecraft archway tutorial.
If you are still getting comfortable with how circular blueprints are generated in the first place, our breakdown of the pixel circle concept is a good starting point. From there, the general circle generator walkthrough shows how to combine that shape data with /fill commands in practice.
Conclusion
The /fill command in Minecraft is one of the fastest ways to handle large building tasks. Once you understand coordinates and modes like replace, hollow, outline, and keep, you can create walls, floors, rooms, and other structures in seconds instead of placing blocks one by one.
For larger areas, always keep the block limit in mind and split the build into smaller sections when needed. You can also use /fill with command blocks and functions to automate repetitive building or clearing tasks.
For Minecraft circles, domes, spheres, and towers, combine /fill with an accurate blueprint to build curved structures much faster. With the right coordinates and fill mode, even complex projects become much easier to manage.
Frequently Asked Questions
What is the /fill command used for in Minecraft?
It fills a rectangular region between two coordinates with a chosen block in a single command, instead of placing blocks one at a time.
Does /fill work the same in Java and Bedrock?
Mostly, but the mode syntax differs. Java uses direct keywords like hollow or replace and also supports strict mode, while Bedrock uses an oldBlockHandling parameter and does not support strict mode.
Is there a replace block command in Minecraft?
Yes, the /fill command's replace mode lets you swap one specific block type for another inside a region without touching anything else in that space.
Why does my /fill command say the position is out of this world?
Your Y coordinate is outside the current build height limit for your edition and version. Check the height limit that applies to the version you are playing.
What is the maximum number of blocks /fill can place at once?
It depends on the edition and version. Java Edition defaults to 32,768 blocks through the commandModificationBlockLimit gamerule and can be adjusted by a server operator, while Bedrock Edition uses a fixed limit. Larger builds need to be split into multiple smaller fill operations either way.