Minecraft command generator
Pick a command, fill in the boxes, copy the result and paste it in chat (with the slash) or in a command block (without it). The generator checks the arguments against the Java Edition syntax and only writes what it can check.
Syntax follows the Minecraft Wiki as accessed on 2026-10-04, for Java Edition 1.20.5 and later (the current Java release on that date). Not tested in game. Plain item and block ids only: no item components, no block states, no custom names.
Examples
What the generator writes for a few common cases:
| Goal | Command |
|---|---|
| Give the nearest player a diamond sword | /give @p diamond_sword |
| Give a player 64 oak logs | /give Alex oak_log 64 |
| Spawn a creeper where you stand | /summon creeper ~ ~ ~ |
| Teleport yourself to X 100, Y 64, Z -200 | /tp @s 100 64 -200 |
| Switch yourself to creative | /gamemode creative |
| Speed II for 60 seconds | /effect give @s speed 60 1 false |
| Fill a 10 × 3 × 10 area with stone | /fill 0 64 0 9 66 9 stone |
How it works
The shape of a command
Every command is a word, then arguments separated by spaces. Square-bracket arguments in the documentation are optional. The generator fills the required ones and only adds the optional ones you ask for.
Targets
@p is the nearest player, @a all players, @r a random player, @s the one running the command, @e every entity. A player name works too. /give and /gamemode need players, so @e is refused there.
Coordinates
A plain number is an absolute position. ~ means relative to where the command runs (~5 is five blocks further) and ^ means relative to where you are looking. You cannot mix ^ with the others in the same position.
Ids
Items, blocks, entities and effects use lowercase ids, optionally with the minecraft: prefix. /give takes a plain id and an optional count from 1 to 2,147,483,647.
What changed in 1.20.5
From Java 1.20.5, extra item data (enchantments, names, custom data) moved from NBT to item components, which changed the syntax of /give. This generator does not write components, because we have not verified them: it covers the plain-id core that is not affected. For enchanted items, read the components section of the wiki.
Where to run it
Chat needs the slash and normally operator rights or cheats enabled. Command blocks and server console take the command without the slash.
FAQ
How do I give myself an item in Minecraft Java Edition?
Type /give @s followed by the item id and, optionally, a count, for example /give @s diamond 64. Use the generator above to build it.
Which Minecraft version are these commands for?
Java Edition 1.20.5 and later, following the Minecraft Wiki as accessed on 2026-10-04. We have not tested them in game. Bedrock Edition uses different syntax for some of these commands and is not covered.
Can this generator make enchanted items?
Not yet. Since 1.20.5 enchantments are item components with a different syntax, and we only publish syntax we have checked.
Why does the game say Unknown or incomplete command?
Usually a missing argument, an uppercase letter in an id, or a space in the wrong place. The generator highlights the field that is wrong.
Why does /fill fail on a big area?
/fill has a limit on how many blocks one command may change, 32,768 for a long time and now set by a game rule according to the wiki. Split the area into several commands.
Sources
- Minecraft Wiki: /give (accessed 2026-10-04)
- Minecraft Wiki: /summon (accessed 2026-10-04)
- Minecraft Wiki: /teleport (accessed 2026-10-04)
- Minecraft Wiki: /gamemode (accessed 2026-10-04)
- Minecraft Wiki: /effect (accessed 2026-10-04)
- Minecraft Wiki: /fill (accessed 2026-10-04)
Unofficial tool. Not affiliated with, approved by or associated with Mojang or Microsoft. Minecraft is a trademark of Mojang.