Minecraft Fill & Setblock Command Builder
Generate /fill and /setblock commands with 150+ blocks organized by category. Set coordinates, fill mode (replace, hollow, outline, destroy, keep), and block state. Essential for builders and mapmakers.
stone
Replaces whatever is at the position (default)
/setblock ~ ~ ~ stone
/setblock vs /fill — Minecraft Command Reference
/setblock and /fill are the two core block-manipulation commands in Minecraft Java Edition. Both require operator permissions (op level 2) or can be used in command blocks.
/setblock
Places a single block at an exact position. Syntax: /setblock <x> <y> <z> <block> [mode]. Coordinates can be absolute (64 70 -200) or relative to the command executor using tilde notation (~ ~1 ~ = one block above the executor).
The three modes control what happens to the existing block at that position:
- replace (default) — Silently replaces whatever is there. No items are dropped. This is the fastest option and the default when no mode is specified.
- destroy — Breaks the existing block as though a player mined it, dropping items and experience. Useful when you want resource drops to appear naturally.
- keep — Only places the block if the target position is currently air. Ideal for filling gaps without overwriting existing builds.
/fill
Fills a rectangular region (defined by two opposite corners) with a block. Syntax: /fill <x1> <y1> <z1> <x2> <y2> <z2> <block> [mode].
Fill Modes Explained
- replace — Fills every position in the region with the chosen block, overwriting everything silently. Add an optional filter block (e.g.,
replace stone) to only replace positions containing that specific block. - hollow — Fills the six outer faces of the region with the block and replaces all interior blocks with air. Great for building empty rooms or clearing underground space while keeping walls.
- outline — Same as hollow, but the interior blocks are left completely untouched. Use this to add walls around an existing structure without disturbing the contents.
- keep — Only fills positions that are currently air. All existing non-air blocks are preserved. Useful for backfilling hollowed-out terrain without overwriting placed blocks.
- destroy — Replaces all blocks and drops their items as if broken by a player. This is slower than replace but is useful when you want to harvest resources from a region.
The 32,768-Block Limit
By default, a single /fill command is capped at 32,768 blocks (32×32×32). This limit is controlled by the max_block_modifications gamerule (introduced in Java Edition 1.21.2 — prior versions used a hard-coded cap). To raise or remove the limit:
/gamerule max_block_modifications 1000000
For regions larger than the limit, split the region into multiple /fill calls or use a datapack/command block chain.
Practical Examples
- Clear a region with air:
/fill ~-10 ~ ~-10 ~10 ~10 ~10 air— removes all blocks in a 21×11×21 cube around the player. - Build a hollow room:
/fill 0 64 0 20 74 20 stone_bricks hollow— places stone brick walls, floor, and ceiling around an empty interior. - Add walls without touching the interior:
/fill 0 64 0 20 74 20 oak_planks outline - Replace only grass with dirt:
/fill ~-16 ~-5 ~-16 ~16 ~ ~16 dirt replace grass_block - Place a single block above you:
/setblock ~ ~1 ~ glass - Remove the block under your feet without dropping items:
/setblock ~ ~-1 ~ air replace - Break the block in front and collect drops:
/setblock ~1 ~ ~ air destroy
Coordinate Tips
Tilde (~) coordinates are relative to the entity running the command. In a command block, that is the command block's own position. Use F3 in-game to display your exact XYZ coordinates. The Y axis is vertical — Y=64 is roughly sea level in a default world.
Caret (^) coordinates (e.g., ^1 ^0 ^0) are relative to the executor's facing direction and are supported by /setblock but not by /fill.
Minecraft Fill & Setblock Command Builder — FAQ
Is this Minecraft Fill & Setblock Command Builder free to use?
Yes, the Minecraft Fill & Setblock Command Builder is 100% free — no signup required, no hidden fees, no downloads. Everything runs in your browser.
How accurate is the Minecraft Fill & Setblock Command Builder?
Values are pulled from the Minecraft game files and community-verified formulas. Results match what you see in-game, and we update the tool when the game gets major patches.
Can I host a Minecraft server with XGamingServer?
Yes. XGamingServer offers instant Minecraft server hosting with mod support, automatic backups, DDoS protection, and 24/7 support. All popular game settings are pre-configured.
Does the Fill & Setblock Command Builder work on mobile?
Yes, the Fill & Setblock Command Builder is fully responsive and works on desktop, tablet, and mobile browsers.
You might also need
XP Calculator
Calculate experience points needed between levels
Enchantment Calculator
Find the best enchantment combinations for your gear
Server Status Checker
Check if any Minecraft server is online and view player count
Server Properties Generator
Generate a complete server.properties file with all options

Config Tool Built Into XGamingServer
Get managed Minecraft hosting with this tool in your panel — configure, deploy, and play in minutes. No file uploads needed.