Skip to content
Outside Australia? Our international site shows prices in US dollars, with the location you choose.
Outside Australia? Our international site shows prices in US dollars, with the location you choose.

Minecraft /give Command Generator

Pick any of the game's 1,657 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.3.

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.3; 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.

FAQ

Usually because it is written for another version. Minecraft changed how /give describes an item in 1.20.5 and again in 1.21.5, and each version only reads its own form, so pick yours in step 6. After that, check that the item exists in your version (maces and spears are newer than a lot of servers) and that you have operator rights. On a Paper or Spigot server with EssentialsX, type /minecraft:give instead of /give, or EssentialsX answers with its own command.

In 1.20.5 the NBT in curly brackets after the item's name became item components in square brackets: {Enchantments:[...]} turned into [enchantments={...}] and display:{Name:...} into custom_name. In 1.21.5 names and lore stopped being JSON text inside quotes and are written directly, and enchantments lost their levels wrapper, so [enchantments={levels:{sharpness:5}}] became [enchantments={sharpness:5}].

Yes. A command can give any enchantment at any level from 1 to 255, the game's cap, where survival stops at V for Sharpness or III for Unbreaking. In step 4, an "i" beside any level past it says where survival stops.

Yes. Survival keeps Sharpness, Smite and Bane of Arthropods apart, and Protection from its three cousins, but a command does not check: the item gets every enchantment on the list. Most then work together; a few just override each other, like Silk Touch over Fortune. Step 4 points out the pairs survival would refuse.

You need operator rights, or the server console itself. In chat, paste the command with its slash; in the console, leave the slash off. Chat takes 256 characters, so a long command with many enchantments or lines of lore goes in a command block or the console instead. On a Play Your Way server, the Players tab builds the same command and sends it to a player for you.

Search for the enchantment in step 1 ("looting 3" finds Enchanted Book (Looting III)): there is a ready-made book for every enchantment at every level, as in the creative inventory. For a book with several, pick the plain Enchanted Book and add them in step 4. Either way the generator stores them the way a book holds them (stored_enchantments, or StoredEnchantments before 1.20.5), so the book puts them on an item in an anvil instead of carrying them itself.

No. Bedrock's /give takes an item, an amount and a data value, with no enchantments, names or lore, so nothing here carries over. Bedrock players who join a Java server through Geyser do get items from these commands like anyone else.