Enchant Command Generator

Enchant the item a player is holding, without needing an enchanting table

The enchantment is applied to the item in the target's main hand

How to use the Enchant command generator

  1. Have the target hold the item to enchant in their main hand first
  2. Choose the enchantment and level you want
  3. Copy the command and run it in Minecraft

/enchant follows the game's normal rules: it only allows enchantments the item supports, up to the usual maximum level. If you need an over-level enchantment or one that doesn't normally fit the item, build a ready-made item with the Give command instead

Worked examples

The examples below come out of the same generator as the form above, so the commands and explanations always match what the tool produces. Copy one and adjust it from there

1. Enchant the item in hand

This works on the item currently held. To create an already-enchanted item, use /give instead

/enchant @p minecraft:sharpness 5

What it does Will apply the enchantment Sharpness level 5 to the item the nearest player is holding in their main hand. If that item cannot take this enchantment, the game does nothing.

2. Make a tool last longer

For a tool you use constantly, so you are not replacing it every few minutes

/enchant @s minecraft:unbreaking 3

What it does Will apply the enchantment Unbreaking level 3 to the item themselves (whoever runs the command) is holding in their main hand. If that item cannot take this enchantment, the game does nothing.

3. Enchant for every player

An @a target enchants what everyone is holding at once — useful when handing out starting kit

/enchant @a minecraft:protection 4

What it does Will apply the enchantment Protection level 4 to the item all players is holding in their main hand. If that item cannot take this enchantment, the game does nothing.

How this command differs by edition and version

This is the first example above, run through every edition and version this tool supports. Versions that produce the same result share a row

Java Edition 1.21.5 and up Java Edition 1.20.5 - 1.21.4 Java Edition 1.13 - 1.20.4 (legacy NBT)
/enchant @p minecraft:sharpness 5
Bedrock Edition (stable)
/enchant @p sharpness 5

Before you use these