Enchant Items Held by Players and Entities
The /enchant command lets you apply an enchantment directly to the item that a player or entity is currently holding. It requires permission level 2, which means you need to be an operator on a server or have cheats enabled in single-player.
Players and map makers use this command to quickly upgrade gear for testing, reward players during adventure maps, or equip mobs with enchanted weapons and tools without needing an anvil or enchanting table.
/enchant <targets> <enchantment> [<level>]/enchant <targets> <enchantment> [<level>]| Argument | Type | What it means |
|---|---|---|
<targets> | target selector | Specifies the player name, UUID, or target selector (such as @p, @a, @e, or @s) holding the item you want to enchant. |
<enchantment> | registry entry enchantment | Selects the enchantment registry entry to apply to the target's held item. |
<level> | whole number at least 0 | Sets the enchantment strength as a whole number of at least 0, or defaults to level 1 if you leave it out. |
/enchant @s minecraft:unbreaking 3Applies Unbreaking level 3 to the item you are currently holding.
/enchant @p minecraft:mendingGives the Mending enchantment at the default level to the item held by the nearest player.
/enchant Steve minecraft:sharpness 5Enchants the weapon held by the player named Steve with Sharpness level 5.
/enchant @a minecraft:efficiency 4Upgrades the tool held by every player on the server with Efficiency level 4.
/enchant @e[type=minecraft:zombie,limit=1] minecraft:fire_aspect 2Applies Fire Aspect level 2 to the weapon held by a single zombie.
/enchant @a[team=red] minecraft:power 3Enchants the bows held by all players on the red team with Power level 3.
/enchant @r minecraft:fortune 2Applies Fortune level 2 to the tool held by a random player.
/enchant @e[type=minecraft:skeleton,distance=..10] minecraft:punch 1Enchants the bows of all skeletons within 10 blocks with Punch level 1.
Measured from the game files of every Java release from 1.13 to 26.3.
Bedrock Edition also has the /enchant command, and it supports two syntax forms: you can specify the enchantment by its name using /enchant <player: target> <enchantmentName: Enchant> [level: int] or by its numeric ID using /enchant <player: target> <enchantmentId: int> [level: int].
You need permission level 2, which means cheats must be turned on in single-player or you must be an operator on a multiplayer server.
No, the level argument is enclosed in square brackets in the syntax, which means it is optional when you just want level 1.
The command was already available in version 1.13, the oldest release measured in our game file records, and remains in the game through version 26.3.