This Minecraft command generator writes ready-to-paste /give, /summon, /effect, /tp and /fill commands in the exact syntax your version uses: Java 1.21.5 and newer, Java 1.20.5β1.21.4, older Java, or Bedrock. It also builds target selectors, warns about Java-only options and splits big /fill jobs that go over the block limit.
Pick your edition first, because the same item or effect needs different syntax in different versions. The command updates as you type.
Commands need cheats enabled in single player, or operator rights on a server.
Java 1.20.5 replaced item NBT tags with data components in square brackets, and 1.21.5 flattened the enchantment list and switched names to SNBT text components. That is why an old command copied from a forum often fails with no useful error.
| Version | Sharpness V on a diamond sword |
|---|---|
| Java 1.21.5+ | diamond_sword[enchantments={sharpness:5}] |
| Java 1.20.5 β 1.21.4 | diamond_sword[enchantments={levels:{sharpness:5}}] |
| Java 1.14 β 1.20.4 | diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:5s}]} |
| Bedrock | /give @p diamond_sword 1, then hold it and run /enchant @p sharpness 5 |
Bedrock /give cannot attach enchantments, names or lore, so the generator writes a /give line plus one /enchant line per enchantment. Bedrock /enchant follows anvil rules, so it refuses levels above the normal maximum. Planning a survival anvil order instead? Use our Minecraft enchantment calculator.
Most command names match, but arguments differ. These are the differences the generator handles for you.
| What | Java Edition | Bedrock Edition |
|---|---|---|
| Effect | /effect give @p minecraft:speed 30 1 | /effect @p speed 30 1 |
| Clear one effect | /effect clear @p minecraft:speed | Not possible: /effect @p clear removes all |
| Selector radius | @e[distance=..10] | @e[r=10] |
| Selector limit | @e[limit=3,sort=nearest] | @e[c=3] |
| Mob data | {CustomName:"Guard",NoAI:1b} | No entity data; only a name tag |
| Other dimension | execute in minecraft:the_nether run tp β¦ | execute in nether run tp β¦ |
The effect level is the amplifier plus one, so amplifier 1 means Speed II. Amplifiers run from 0 to 255. For Nether trips, our nether portal calculator gives the matching coordinates to type into /tp.
One /fill command can change 32,768 blocks by default. The count is the whole box, (|x2 β x1| + 1) Γ (|y2 β y1| + 1) Γ (|z2 β z1| + 1), even in hollow or keep mode.
Blocks = (Ξx + 1) Γ (Ξy + 1) Γ (Ξz + 1), limit 32,768
Example: 0 60 0 to 99 70 99 is 100 Γ 11 Γ 100 = 110,000 blocks. The generator cuts the box into slices along the longest side, each slice 29 blocks thick (29 Γ 11 Γ 100 = 31,900), so four commands do the job. On Java you can raise the limit with a game rule instead (commandModificationBlockLimit, named max_block_modifications from 1.21.11). For round builds, our Minecraft circle generator gives the block plan row by row.
The generator covers the options people use most, not every argument of every command. Check a new command in a test world before you use it on a server.
Turn on cheats (or get operator rights on a server), press T or / to open chat, paste the command and press Enter. In a command block, paste it without the leading slash.
The item syntax changed in Java 1.20.5 and again in 1.21.5. On 1.21.5 and newer, enchantments are written as enchantments={sharpness:5}; the older {levels:{β¦}} and {Enchantments:[β¦]} forms fail.
Not with /give alone. Give the item, hold it, then run /enchant for each enchantment. Bedrock /enchant only accepts levels up to the normal maximum, such as Sharpness V.
Use infinite as the duration: /effect give @p minecraft:night_vision infinite in Java 1.19.4 and newer, or /effect @p night_vision infinite in Bedrock 1.21.0 and newer.
32,768 blocks per command by default in both editions. Larger areas need several /fill commands, or a higher limit set with a game rule in Java.