NapNodes

← Minecraft guides

Minecraft · updated 3 November 2026

The /fill Command in Minecraft: Fill, Clear and Build Hollow Boxes (and /clone)

/fill puts the same block across a whole area at once: a floor, a glass box, a wall, or air to clear out a mountain. With /clone you copy or move an entire build. Here's how they're written today in Minecraft Java, what each mode does, why you get “too many blocks” and how to use them from the server console.

Who can use it

/fill and /clone are operator commands (level 2). In a single-player world you need cheats turned on; on a server, being op: in the server console type op YourName. A normal player gets “Unknown or incomplete command”.

This guide is for Minecraft Java, the one servers with Paper run. In Bedrock /fill looks similar, but the names of some blocks and modes don't match.

Rather not set it up yourself? Minecraft servers from €6 a month, no contract and a full refund within 72 hours. Or create a free Minecraft server, no card needed.

How it's written

The shape is /fill x1 y1 z1 x2 y2 z2 block mode: two opposite corners of the area, the block and, if you want, a mode. Both corners are part of the area and it doesn't matter which one goes first.

You see your coordinates with F3 (the “Block” line). Relative ones work too: ~ is where you are, ~5 five blocks further along that axis, and ^ follows where you're looking. For example, /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 stone makes an 11 × 11 stone floor under your feet.

The block goes by its ID (stone, oak_planks, white_concrete), with or without minecraft: in front; pressing Tab shows you the list. To see a block's ID, press F3 + H and hover over it in the inventory, or look at it with F3: it shows on the right. You can add states in square brackets, like oak_stairs[facing=north].

For a single block you don't need /fill: /setblock x y z block places it in that spot, even a chest already filled or a command block already written (/setblock guide (in Spanish)).

The modes: what each one does

If you don't add a mode, it's replace: it changes everything in the area, air included. The others go at the end of the command:

  1. replace with a filter: swap one block for another

    /fill x1 y1 z1 x2 y2 z2 stone_bricks replace cobblestone changes only the cobblestone into stone bricks and leaves the rest. The filter takes tags: replace #minecraft:logs changes any log. /fill … air replace water removes the water from the area.

  2. hollow: a hollow box

    Puts the block on the edge (walls, floor and ceiling) and empties the inside with air. /fill ~-3 ~-1 ~-3 ~3 ~4 ~3 glass hollow shuts you in a glass box; whatever was inside disappears.

  3. outline: just the edge

    Like hollow, but the inside isn't touched. Handy for closing off an area without destroying what's already there, for example with barrier (invisible barrier) around a build.

  4. keep: only the gaps

    Places the block only where there's air right now. For filling a cave or plugging holes without breaking what's already built.

  5. destroy: break and drop

    Changes everything like replace, but what was there breaks and drops its items, as if you'd mined it. In big areas it leaves the ground covered in dropped items and can cause lag: use it in small spaces.

  6. strict: without updating the surroundings

    Since 1.21.5. Places the blocks without the game updating the ones next to them (no “block updates”). People who build with commands use it so nothing gets knocked out of place; if you don't know you need it, leave it out. It goes on its own or after the replace filter.

“Too many blocks”: the 32 768 block limit

A /fill or /clone changes at most 32 768 blocks at once. The whole box counts, whatever the mode: one of 40 × 40 × 21 is 33 600 and no longer fits. The game answers “Too many blocks in the specified area” and does nothing.

There are two ways out. The first, split the area into chunks that fit: the /fill and /clone generator does it for you, also with hollow and outline without leaving walls in the middle. The second, raise the limit with the max_block_modifications rule: gamerule max_block_modifications 100000 (before 1.21.11 it was called commandModificationBlockLimit; every rule that changed, in the gamerules guide).

Raising the limit isn't free: a /fill of hundreds of thousands of blocks freezes the server for a few seconds and anyone playing gets a stutter. For really big builds, WorldEdit is better: it spreads the work over time and lets you undo it.

Other errors you'll see

“That position is not loaded”: one of the corners falls in chunks that aren't loaded. /fill only works near players (or in areas loaded with forceload). Get closer to the area and try again.

“No blocks were filled”: the command was fine but there was nothing to change; for example, keep in an area with no air, or a filter that matches no block in the area.

“Unknown block type” or the command in red as you type it: the block ID is wrong or doesn't exist in your version. Press Tab while you type it so the game completes it.

If you see a height outside the world: in the Overworld you can build from −64 to 319; in the Nether and the End, from 0 to 255.

/clone: copying and moving builds

The shape is /clone x1 y1 z1 x2 y2 z2 x y z: the two corners of what you want to copy and the destination point, which is the bottom corner with the smallest X, Y and Z of the copy. The copy comes out the same, without rotating or mirroring.

After the destination you can say how it copies: replace (everything, the default), masked (without the air: it doesn't wipe what's around the destination) or filtered followed by a block (only that one). And then normal, move (removes it from the source: moving instead of copying) or force (required if source and destination overlap).

In today's versions you can copy from one dimension to another: /clone from minecraft:overworld x1 y1 z1 x2 y2 z2 to minecraft:the_nether x y z. The block limit is the same as /fill's.

With the /fill and /clone generator you enter the corners and the destination and it writes the command for you, with force if needed. All of /clone step by step (what it copies and what it doesn't, rotating a copy, moving between dimensions), in its own guide (in Spanish).

From the server console

In the console, commands go without the slash. And the console isn't anywhere: with ~ it doesn't know where to start from, so use fixed coordinates (fill 0 64 0 10 64 10 stone) or make the command start from a player with execute:

  1. Around a player

    execute at Ana run fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 glass puts a 5 × 5 glass floor under Ana.

  2. In the Nether or the End

    execute in minecraft:the_nether run fill 0 100 0 4 100 4 obsidian makes a platform in the Nether. Remember that area has to be loaded (someone has to be nearby).

Ideas for using it on a server

A waiting platform for an event with hollow and glass or barrier; draining the water from a monument with air replace water; changing a town's floors with replace and a filter; or, in a build contest (in Spanish), plots closed off with barriers and copied with /clone.

Before a big /fill in everyone's world, back up the world: a wrong mode (hollow instead of outline) wipes what was inside and /fill has no undo.

On NapNodes

Minecraft servers run Paper on the latest version, so everything in this guide works, strict included. From the panel's “Console” you make yourself op (op YourName) and can run your /fill commands with execute.

The block limit can be changed without commands in “Settings” → “Game rules” → “Command modification block limit”, with the server running. And before a big job, “Backups” → “Create Backup” on paid plans (on the free server, download the world from “Files”).

Frequently asked questions

How do you use the /fill command in Minecraft?

With /fill x1 y1 z1 x2 y2 z2 block: two opposite corners and the block, for example /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 stone. You need to be op or have cheats turned on.

How do I make a hollow box with /fill?

With the hollow mode at the end: /fill ~-3 ~-1 ~-3 ~3 ~4 ~3 glass hollow. If you don't want to wipe what's inside, use outline.

How do I replace one block with another using /fill?

With replace and the block you want to change: /fill x1 y1 z1 x2 y2 z2 stone_bricks replace cobblestone only changes the cobblestone.

What's the maximum number of blocks for /fill?

32 768 by default, set by the max_block_modifications rule. Raise it with gamerule max_block_modifications 100000 or split the area into chunks.

How do I remove water from an area with commands?

With /fill x1 y1 z1 x2 y2 z2 air replace water, in chunks of fewer than 32 768 blocks.

How do I copy a build with commands?

With /clone x1 y1 z1 x2 y2 z2 x y z: the two corners and the bottom corner of the destination. With move at the end it moves it instead of copying it.

Shall we set it up for you?

Minecraft servers from €6 a month, never oversold: your RAM is yours alone. And if you'd rather start without paying, there's a free Minecraft server, no card needed.

Your server doesn't show up in the game? Check it in a second with “Is my Minecraft server online?”: players, version and MOTD, free. Need a player's UUID for the whitelist or permissions? Look it up here. Handing out enchanted items? Build the command with the /give generator.

Free tool: /fill and /clone generator. Two corners and a block, and out comes the /fill or /clone. Over 32768 blocks, it splits it into commands that fit and do the same.

Keep reading

All Minecraft guides, sorted →