/give command generator
Pick an item, add enchantments and a name, then copy a ready command. The syntax follows the game version you choose.
Your command
Fits in chat (up to 256 characters)
Run it in chat with cheats enabled or put it into a command block. It needs operator permission level 2.
Diamond Sword
minecraft:diamond_sword
How to use
- Choose your game version. Java 1.20.5 replaced item NBT with data components and 1.21.5 changed the format again, so a command for one version often fails in another.
- Type the item ID. The field suggests every vanilla item; the minecraft: prefix is optional.
- Add enchantments, a name, lore or attribute modifiers. Warnings tell you when a level or combination goes beyond survival limits.
- Copy the command and run it in chat with cheats enabled. If it is longer than 256 characters, paste it into a command block.
Questions and answers
Why does my old /give command no longer work?
Since Java 1.20.5 items use data components in square brackets instead of NBT in curly braces: diamond_sword[enchantments=...] instead of diamond_sword{Enchantments:[...]}. In 1.21.5 enchantments lost the levels wrapper and names became SNBT text instead of JSON. Choose your exact version above and the generator writes the matching syntax.
Can I go above the normal enchantment level?
Yes. /give accepts any level from 1 to 255, while /enchant and the anvil stop at the survival maximum such as Sharpness V. How much a higher level helps depends on the enchantment: damage enchantments keep scaling, others stop at a fixed limit.
What if the command is too long for chat?
Chat accepts up to 256 characters. Long lore or many enchantments go past that. Get a command block with /give @s command_block, paste the command (up to 32,500 characters) and power it with a button. On a server, command blocks must be enabled in server.properties.
Does it work in Bedrock Edition?
No. Bedrock /give takes an item name, amount, data value and a JSON list of components that supports only can_place_on, can_destroy, item_lock and keep_on_death. Enchantments and custom names cannot be set there, so this generator writes Java Edition syntax only.