/enchant Command in Minecraft Java Edition

Enchant Items Held by Players and Entities

Java EditionItems & InventoryPermission: Level 2Bedrock version →

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.

Syntax (Java 26.3, 1 form)

  1. /enchant <targets> <enchantment> [<level>]

The forms you will use most

/enchant <targets> <enchantment> [<level>]
Applies the chosen enchantment at an optional level to the item held by the selected targets.

Arguments

ArgumentTypeWhat it means
<targets>target selectorSpecifies 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.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

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].

See /enchant in Bedrock Edition →

FAQ

What permission level do I need to use /enchant?

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.

Do I have to type the enchantment level every time?

No, the level argument is enclosed in square brackets in the syntax, which means it is optional when you just want level 1.

When was the /enchant command available in Java Edition?

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.

Related commands

/clear/give/item/loot/recipe