Minecraft /give Command Generator
Pick any of the game's 1,536 items or a ready-made potion, enchanted book or other variant, add enchantments, a name and lore, and copy a command written the way your version reads it. Java Edition, 1.14 up to 26.2.
Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft. Items, names and enchantments come from Mojang's data generator for 26.2; the item pictures are Mojang's art, drawn from the game's files by deepslate.
Which version's command you need
Minecraft has changed how /give describes an item twice, and a command written for one side of either change fails on the other with an error, not a slightly different item.
Up to 1.20.4 the details follow the item's name as NBT in curly brackets. 1.20.5 swapped that for item components in square brackets. 1.21.5 kept the square brackets but writes names and lore directly instead of as JSON inside quotes, and drops the wrapper around enchantment levels. The same Sharpness V sword, three ways:
- 1.21.5 and newer
- /give @p minecraft:diamond_sword[enchantments={sharpness:5}] 1
- 1.20.5 to 1.21.4
- /give @p minecraft:diamond_sword[enchantments={levels:{sharpness:5}}] 1
- 1.14 to 1.20.4
- /give @p minecraft:diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:5s}]} 1
Not sure which you run? It is on the game's title screen and in the first lines of your server's log.
Who gets the item
The part after /give says who the item goes to: a player's name, or one of the game's shortcuts.
- @p
- The nearest player to where the command runs. From the server console, that is whoever stands nearest world spawn.
- @s
- Whoever runs it: you, in chat. It fails in the console, which is not a player.
- @a
- Everyone online.
- @r
- One random player who is online.
- A name
- That player, who has to be online.
Every one of them needs operator rights or the server console. Chat takes 256 characters; anything longer goes in a command block or the console.