Skip to content

Type to search across every guide and reference page.

CommandsBoth · 26.x

Minecraft /enchant Command: Syntax, Max Levels, Bypassing

/enchant @s sharpness 5 adds an enchantment to the item you're holding. Java and Bedrock syntax, why it fails above max level, and how to get around that.

By minecraft.bd Editorial Team·Updated

/enchant adds one enchantment to the item in a player’s main hand. Hold a diamond sword and run /enchant @s sharpness 5. It only works within the normal rules: the item must accept the enchantment, the level can’t go above the usual maximum, and it can’t conflict with enchantments already on the item.

/enchant syntax

Java Edition

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

Bedrock Edition

/enchant <player> <enchantmentName> [level]
/enchant <player> <enchantmentId> [level]

Level defaults to 1. Bedrock also accepts the numeric enchantment ID instead of the name. Find every name and number on our enchantment IDs page.

/enchant examples

/enchant @s sharpness 5
/enchant @s mending
/enchant @s efficiency 5
/enchant @p protection 4
/enchant @a unbreaking 3

To fully kit out a sword, run several in a row, one per enchantment:

/enchant @s sharpness 5
/enchant @s looting 3
/enchant @s unbreaking 3
/enchant @s mending

What makes it fail

  • Empty hand. It enchants the main-hand item only.
  • Wrong item. Sharpness on a pickaxe or Efficiency on a sword won’t take (Efficiency works on axes and shears, not swords).
  • Over the max level. /enchant @s sharpness 10 is rejected.
  • Conflicts. Sharpness with Smite, Mending with Infinity, Fortune with Silk Touch, Protection with Fire Protection and so on. If you’re not sure what conflicts, check the full enchantments list.
  • Wrong name. It’s sweeping_edge (Java), not “sweeping”. Bedrock doesn’t have Sweeping Edge at all.

Going over the limit

Java’s /give with item components doesn’t check level caps or conflicts:

/give @s diamond_sword[enchantments={sharpness:10,smite:5,mending:1,unbreaking:3}]

That’s the standard way to make “overpowered” gear for testing or maps. The /give command page explains the component format, including the older 1.20.5 to 1.21.4 version.

Bedrock has no vanilla command that goes past the max, so on Bedrock the cap holds.

/enchant vs a real enchanting table

/enchant costs no XP. If you want to test what an enchanting table would give you, you’ll need levels; grab them with the /xp command. And if you want a long-lasting tool in survival, nothing beats Mending.

More commands are on the commands hub.

Common questions

Why does /enchant say the level is too high?

/enchant only allows levels up to the enchantment's normal maximum, like Sharpness V. To go higher on Java, use /give with an enchantments component instead.

Can /enchant add Mending and Infinity to the same bow?

No. /enchant follows the same compatibility rules as an anvil, so mutually exclusive enchantments are rejected. /give with components on Java ignores those rules.

Do I need to hold the item?

Yes. /enchant applies to the item in the target's main hand. If the hand is empty or the item can't take that enchantment, the command fails.

Sources & verification

Facts on this page are checked against these references and in-game behavior for the stated edition(s). how we verify.

Keep reading