Skip to main content

/enchant

Enchants the item held in a player's main hand. Only allows enchantments that are compatible with the held item and does not exceed the enchantment's maximum level.

Category
Player
Permission Level
Game Master
Version Added
1.0

Overview

Enchants the item held in a player's main hand. Only allows enchantments that are compatible with the held item and does not exceed the enchantment's maximum level. In vanilla Minecraft Java Edition it is one of the player commands and has been available since version 1.0.

It is invoked as /enchant [] and accepts 2 required arguments ( and ) and one optional argument ([level]).

This command respects enchantment compatibility rules. To bypass these restrictions, use /give with component syntax or /item modify to apply arbitrary enchantments.

The command refuses incompatible or over-max enchantments — to exceed normal limits or stack conflicting enchantments use /give with component data or /item modify.

Syntax & Arguments

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

The full syntax is /enchant []. Angle brackets < > mark required arguments and square brackets [ ] mark optional ones; a vertical bar | between words means you pick exactly one of those literals. You must always supply and . The argument [level] may be omitted, in which case the documented default applies.

targets
Required, of type an entity. The player(s) whose held item to enchant.
enchantment
Required, of type a resource. The enchantment to apply (e.g., sharpness, efficiency, protection).
level
Optional, of type an integer. The enchantment level. Cannot exceed the enchantment's max level. Defaults to 1.

Parameters

NameTypeRequiredDescription
targetsentityRequiredThe player(s) whose held item to enchant.
enchantmentresourceRequiredThe enchantment to apply (e.g., sharpness, efficiency, protection).
levelintegerOptionalThe enchantment level. Cannot exceed the enchantment's max level. Defaults to 1.

Examples

The 3 examples below are ready to copy and adapt. For instance, /enchant @s sharpness 5 enchants your held item with Sharpness V. Each example varies the arguments to show a different real use of /enchant; read the note under every snippet to see exactly what changes.

/enchant @s sharpness 5

Enchants your held item with Sharpness V.

/enchant @p unbreaking 3

Enchants the nearest player's held item with Unbreaking III.

/enchant @s mending 1

Applies Mending to your held item.

Permission Level & Requirements

/enchant sits at permission Level 2 - Game Master / Cheats, which means it needs permission level 2, the level cheats grant to single-player worlds and that operators hold by default.

In a single-player world you must have "Allow Cheats" turned on (or open the world to LAN with cheats) before it will run; on a multiplayer server the player needs to be an operator at the matching level.

This reference describes the Java Edition 1.21 form of the command; Bedrock Edition may use slightly different argument formats.

Common Mistakes

Notes

This command respects enchantment compatibility rules. To bypass these restrictions, use /give with component syntax or /item modify to apply arbitrary enchantments.

Related Commands

If /enchant is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /give, /xp, and /item. They cover closely related tasks, so the links above jump straight to each one.

Frequently Asked Questions about /enchant

What does the /enchant command do in Minecraft?

Enchants the item held in a player's main hand. Only allows enchantments that are compatible with the held item and does not exceed the enchantment's maximum level. It belongs to the player command group and was added in Java Edition 1.0.

What is the correct syntax for /enchant?

/enchant []. The required arguments are targets and enchantment, and the optional one is level.

What permission level does /enchant need?

It requires permission Level 2 - Game Master / Cheats. On a server the player must be an operator at that level, or have cheats enabled in single-player.

What is a common mistake when using /enchant?

Trying to enchant beyond the max level (e.g., Sharpness 6), the command will fail. Use /give with component data for levels beyond the normal max.

Can you give an example of /enchant in use?

Yes. /enchant @p unbreaking 3 — enchants the nearest player's held item with Unbreaking III.

Need a Minecraft server?

Try these commands on Astroworld or host your own server.

Try Astroworld Hosting