Minecraft /give Command Generator
Pick from all 1,536 items in the game, add enchantments, a name and lore, then copy the command. Works for both current versions and anything back to 1.20.4.
Item
Diamond Sword
minecraft:diamond_sword
387 shown
Enchantments
/5
Appearance
Leave empty to keep the item's normal name.
Lore
The description shown under the item name.
Diamond Sword
/give @p minecraft:diamond_sword[enchantments={sharpness:5}] 1
Uses item components in square brackets. Using the wrong one for your version gives a syntax error rather than an item, so check which you need.
Run this from the server console or in game as an operator. On an MCHosts server you can paste it straight into the console in your control panel, without the leading slash.
Need somewhere to run it?
Commands like this need operator access on your own server. Every MCHosts plan gives you a full console and op rights from the moment it starts.
🔒 Risk-free, 7 day money back guarantee. Australian servers, set up in minutes.
The 1.20.5 syntax change
This is why so many give commands found online no longer work. Up to 1.20.4, extra data on an item rode along in an NBT tag written in curly braces. From 1.20.5 the same information is expressed as item components in square brackets.
| Version | An enchanted sword looks like |
|---|---|
| 1.20.5 and newer | /give @p minecraft:diamond_sword[enchantments={sharpness:5}] 1 |
| 1.20.4 and older | /give @p minecraft:diamond_sword{Enchantments:[{id:"sharpness",lvl:5}]} 1 |
Using one on the other gives a syntax error rather than an item, so it is worth checking which your server runs before copying anything out of a guide.
Target selectors
Who receives the item. These work the same way in every command, not just give.
| Selector | Who it means |
|---|---|
| @p | nearest player |
| @s | yourself |
| @a | every player |
| @r | a random player |
Enchantments and their survival limits
Commands ignore the limits that apply at an enchanting table or anvil, so you can exceed these levels or combine enchantments that normally conflict. The maximums below are what is reachable in ordinary play.
| Enchantment | Id | Survival max |
|---|---|---|
| Sharpness | sharpness | 5 |
| Smite | smite | 5 |
| Bane of Arthropods | bane_of_arthropods | 5 |
| Knockback | knockback | 2 |
| Fire Aspect | fire_aspect | 2 |
| Looting | looting | 3 |
| Sweeping Edge | sweeping_edge | 3 |
| Efficiency | efficiency | 5 |
| Silk Touch | silk_touch | 1 |
| Unbreaking | unbreaking | 3 |
| Fortune | fortune | 3 |
| Mending | mending | 1 |
| Power | power | 5 |
| Punch | punch | 2 |
| Flame | flame | 1 |
| Infinity | infinity | 1 |
| Protection | protection | 4 |
| Fire Protection | fire_protection | 4 |
| Blast Protection | blast_protection | 4 |
| Projectile Protection | projectile_protection | 4 |
| Feather Falling | feather_falling | 4 |
| Thorns | thorns | 3 |
| Respiration | respiration | 3 |
| Aqua Affinity | aqua_affinity | 1 |
| Depth Strider | depth_strider | 3 |
| Frost Walker | frost_walker | 2 |
| Soul Speed | soul_speed | 3 |
| Swift Sneak | swift_sneak | 3 |
| Loyalty | loyalty | 3 |
| Channeling | channeling | 1 |
| Riptide | riptide | 3 |
| Impaling | impaling | 5 |
| Multishot | multishot | 1 |
| Quick Charge | quick_charge | 3 |
| Piercing | piercing | 4 |
| Density | density | 5 |
| Breach | breach | 4 |
| Wind Burst | wind_burst | 3 |
Frequently asked questions
Need a server to run these on? Take a look at our server plans, every one of which includes full console access. You might also want the MOTD generator for your server list message.
Item list and icons generated from the official Minecraft 26.2 release. Minecraft item names and textures are the property of Mojang Studios and are shown here to identify items. NOT AN OFFICIAL MINECRAFT SERVICE. MCHosts is not approved by or associated with Mojang Studios or Microsoft.