/enchant command
The /enchant command puts an enchantment on the item a player is holding. It follows the compatibility rules and maximum levels. For advanced enchanting, use /give with components.
Syntax
Java and Bedrock Edition
/enchant <player> <enchantment> [level] Parameters in <angle brackets> are required. Parameters in [square brackets] are optional.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| player | selector/player | Yes | The player holding the item to enchant. |
| enchantment | enchantment ID | Yes | The enchantment ID, for example sharpness, unbreaking, mending, protection or efficiency. |
| level | number | No | The enchantment level, from 1 up to the maximum. Defaults to 1. You can't go above the maximum level (for example 5 for Sharpness). |
Usage examples
Tips and tricks
The /enchant command follows the compatibility rules: you can't put Silk Touch on an item that has Fortune. For "illegal" combinations, use /give with components.
You can't go above an enchantment's maximum level with /enchant: Sharpness V is the max.
The enchantment goes on the item in the player's main hand, so make sure they're holding the right item.
Popular IDs: sharpness, smite, efficiency, fortune, silk_touch, unbreaking, mending, protection, feather_falling, power, infinity.
Related commands
/give
Adds any item to a player's inventory, with support for the amount, NBT data (Java) and component...
/item
Replaces or modifies items in the inventory slots of an entity or a block (chest, hopper). The su...
/clear
Removes items from a player's inventory. You can remove specific items or clear the whole invento...
Frequently asked questions
How do you use the /enchant command in Minecraft?
Open the chat with the T or / key and type the command using this syntax: /enchant <player> <enchantment> [level]. The /enchant command puts an enchantment on the item a player is holding. It follows the compatibility rules and maximum levels. For advanced enchanting, use /give with components.
What permissions does /enchant require?
The /enchant command requires permission level 2: Operator (OP 2). In singleplayer with cheats turned on, you automatically have full permissions. On a multiplayer server, you need operator status, which is granted with the /op command.
Does /enchant work in Bedrock Edition?
Yes, the /enchant command works in both Java Edition and Bedrock Edition, with similar syntax.



