How to Use the Generated Command
- Enable cheats in a single-player world or make sure you have operator permission on a server.
- Open chat, paste the generated command, and press Enter. Long commands that exceed the chat limit need a command block.
- If Minecraft reports an unknown item, confirm that the selected ID exists in your exact game version — the version availability check above does this automatically.
Java Edition /give Syntax by Version
The /give command has changed format three times. Picking the wrong one is the most common reason a pasted command fails.
| Format | Versions | Item data style | Enchanted sword example |
|---|---|---|---|
| Current components | 1.21.5 – 26.x | Components, simplified maps, SNBT text | /give @s netherite_sword[enchantments={sharpness:5}] 1 |
| Early components | 1.20.5 – 1.21.4 | Components with levels wrapper, JSON text |
/give @s netherite_sword[enchantments={levels:{sharpness:5}}] 1 |
| NBT | 1.13 – 1.20.4 | SNBT tag after the item | /give @s netherite_sword{Enchantments:[{id:"minecraft:sharpness",lvl:5s}]} 1 |
| Numerical IDs | 1.8 – 1.12.2 | Numeric ID + data value | /give @s 276 1 0 |
- 1.13 “The Flattening” replaced numerical IDs with namespaced IDs.
- 1.20.5 replaced the NBT item tag with typed item components (
Enchantments:[…]becameenchantments={…}). - 1.21.2 removed the
generic.prefix from attribute ids (generic.attack_damage→attack_damage). - 1.21.4 turned
custom_model_datainto a structured component ({floats:[1001]}). - 1.21.5 removed the
levelswrapper from enchantments, inlineddyed_colorand thecan_break/can_place_onpredicates, and switched text components from JSON strings to SNBT (custom_name={text:'Excalibur'}).
Common /give Errors and Fixes
- “Unknown item” — the item did not exist in your game version (for example the Mace needs 1.21+). Choose a newer syntax format or a different item; the generator blocks known mismatches automatically.
- “Unknown or incomplete command” on a server — a plugin such as Essentials often overrides /give. Tick Use /minecraft:give to call the vanilla command directly.
- Command too long for chat — the chat box accepts about 256 characters. Paste longer commands into a command block instead; the length meter under the output warns you.
- Command from an old guide fails in 1.21.5+ — the
levelswrapper and JSON text components were removed. Regenerate the same item in the current format, or import the old command here and switch formats.
Target Selector Quick Reference
@sgives the item to the command executor.@pselects the nearest player.@agives the quantity to every online player.- A player name targets one specific account.
Need More Command Examples?
Read the Minecraft give command guide, browse the item ID list, or open the Diamond ID example. To place a block at coordinates instead of adding it to an inventory, use the Setblock Command Generator.
Want enchanted gear? For full control over enchantment levels (including Creative-level 255 gear, conflict rules, and per-item presets), open the Enchanted Gear Generator — it produces the full /give command with enchantment data for both current and legacy formats.