The command to fill a region with TNT in Minecraft is /fill <x1> <y1> <z1> <x2> <y2> <z2> tnt. You can copy and paste that directly into the chat window in Java Edition (with cheats enabled) or in Bedrock Edition (with cheats on), replacing the coordinates with your own. For example, /fill 100 64 100 110 70 110 tnt fills a 11×7×11 block area with TNT. This article explains how the command works, its limits, and how to use it safely.
What the /fill Command Does
The /fill command is a built-in server and single-player command in Minecraft that replaces all blocks in a rectangular volume with a specified block. It is available in Java Edition and Bedrock Edition, but the syntax and limits differ slightly. In Java Edition, the command requires operator permissions (or cheats enabled in single-player). In Bedrock Edition, cheats must be enabled in the world settings. The command is not available in vanilla survival mode without cheats.
The basic syntax is:
/fill <from> <to> <block>— fills the region with the block./fill <from> <to> <block> [replace|destroy|keep|hollow|outline|replace <filter>]— optional modes change how existing blocks are handled.
For TNT, the block ID is simply tnt. You can also use minecraft:tnt for clarity. The command does not ignite the TNT; it only places TNT blocks. To detonate them, you need to activate them with redstone, fire, or another explosion.
Copy-and-Paste Examples
Here are ready-to-use commands. Replace the coordinates with your own. Coordinates can be absolute (e.g., 100 64 100) or relative (e.g., ~ ~ ~). Relative coordinates are based on your current position.
- Fill a 10×10×10 cube with TNT:
/fill ~ ~ ~ ~10 ~10 ~10 tnt - Fill a flat layer of TNT:
/fill ~-5 ~ ~-5 ~5 ~ ~5 tnt - Fill a hollow box of TNT:
/fill ~ ~ ~ ~10 ~10 ~10 tnt hollow - Fill only replacing stone:
/fill ~ ~ ~ ~10 ~10 ~10 tnt replace stone
Note: In Java Edition, the maximum volume per /fill command is 32,768 blocks. In Bedrock Edition, the limit is 32,768 blocks as well, but some versions may have a lower limit (often 32,768). If you exceed the limit, the command fails with an error. To fill larger areas, you need multiple commands or a different tool like a command block loop or structure blocks.
How to Use the Command: Step by Step
- Enable cheats: In single-player, open your world to LAN with cheats on, or create a world with cheats enabled. On a server, you need operator status.
- Open the chat window (default key: T or /).
- Type or paste the command. To paste, use Ctrl+V (Windows/Linux) or Command+V (Mac).
- Press Enter. If the command is valid, you will see a confirmation message and the blocks will appear.
- To undo, use
/fillagain with air, or use the/undocommand if available (not vanilla).
If you get an error like "Too many blocks in the specified area", reduce the volume or split the fill into smaller sections.
Common Problems and Fixes
- "Unknown command": Cheats are not enabled, or you are not an operator. Enable cheats in world settings or ask a server admin.
- "Too many blocks": The volume exceeds 32,768 blocks. Split into smaller fills or use a command block loop.
- "Block not found": Ensure you typed
tntcorrectly. In some versions, you may needminecraft:tnt. - Coordinates out of range: In Java Edition, coordinates must be within -30,000,000 to 30,000,000. In Bedrock, the world border may be smaller.
- TNT does not explode: The command only places TNT. You must ignite it separately.
Safety and Performance Considerations
Filling a large area with TNT can cause severe lag when ignited, especially on servers. A single TNT explosion is relatively small, but hundreds or thousands of TNT blocks exploding simultaneously can crash the game or corrupt chunks. Always test in a creative world first. On servers, check with administrators before using mass TNT commands. Also, TNT explosions can destroy terrain and cause damage to entities; use /gamerule tntExplodes false to prevent ignition if needed.
If you want to fill with TNT but not have it explode, you can place it and then use a tool like a button or lever to detonate selectively. Alternatively, use the destroy mode to replace blocks and drop items, but that also causes explosions.
Java vs. Bedrock Differences
The /fill command works similarly in both editions, but there are subtle differences:
- Java Edition uses the syntax
/fill <x1> <y1> <z1> <x2> <y2> <z2> <block> [mode]. - Bedrock Edition uses
/fill <from: x y z> <to: x y z> <tileName: Block> [blockStates: block states] [replace|destroy|keep|hollow|outline]. - Bedrock may require block states for some blocks, but TNT has no states.
- Maximum volume: Java 32,768; Bedrock 32,768 (some versions may be 32,768).
In both editions, relative coordinates (~) and caret coordinates (^) are supported. Caret coordinates are based on the direction the player is facing, which can be confusing for fills; absolute or relative are recommended.
Alternatives to /fill for TNT
If you need to place TNT in shapes other than a rectangular box, consider these methods:
- Structure blocks: Save a TNT structure and load it repeatedly.
- Command blocks: Use a loop command block to place TNT in a pattern.
- WorldEdit (mod/plugin): Provides more flexible fill commands, including spheres and cylinders.
- Clone command: Copy an existing TNT arrangement to another location.
These alternatives are useful for large builds or complex shapes, but they require more setup than a single /fill command.
Frequently Asked Questions
Can I fill with TNT in survival mode?
No, the /fill command requires cheats or operator permissions, which are not available in vanilla survival mode without enabling cheats. You can enable cheats in world settings, but that disables achievements in Java Edition.
How do I fill a large area with TNT without lag?
Break the fill into smaller sections, use a command block loop with a delay, or fill with TNT and then use /gamerule tntExplodes false to prevent explosions. Testing in a creative world first is recommended.
Why does my /fill command say "Too many blocks"?
The volume of your fill exceeds the maximum allowed (32,768 blocks). Reduce the size or split the fill into multiple commands.
Can I use /fill to place primed TNT?
No, /fill only places TNT blocks, not primed TNT entities. To summon primed TNT, use /summon tnt or /summon minecraft:tnt.
Is /fill available on Minecraft Bedrock Edition?
Yes, but cheats must be enabled in the world settings. The syntax is slightly different, but the block name tnt works the same.
What happens if I fill with TNT and then ignite it?
All TNT blocks will explode in a chain reaction, which can cause massive destruction and lag. Use with caution, especially on servers.