/enchant Command Generator
BetaPick the item in hand and the enchantments you want, or press Best to fill in every enchantment that fits at max level. The preview shows the tooltip you'll get and crosses out anything the game would refuse.
Describe it — AI writes the command
Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.
Checking the AI…
Paste a command— edit it here or move it to another version
Your command · Java 26.3
100 characters/enchant @p minecraft:sharpness 5/enchant @p minecraft:looting 3/enchant @p minecraft:unbreaking 3
- Works on the item in the main hand. An enchantment the item already has fails on Java; use /give for a ready-made enchanted item.
Raw editor
How it works
/enchant works on the item in the player’s main hand and adds one enchantment per command, so a fully enchanted sword takes a few lines:
Java 1.13 and later
enchant @p minecraft:sharpness 5 enchant @p minecraft:looting 3 enchant @p minecraft:unbreaking 3
Sweeping Edge is sweeping_edge from 1.20.5 and sweeping before. The level can be left out when it is 1.
Java 1.8 to 1.12
enchant @p 16 5 enchant @p 21 3 enchant @p 34 3
Old versions are written with numeric enchantment IDs (16 is Sharpness, 21 Looting, 34 Unbreaking), which work in every one of them.
Bedrock
enchant @p sharpness 5 enchant @p looting 3
Bedrock names the curses binding and vanishing and has no Sweeping Edge.
The rules /enchant follows
Unlike /give, /enchant plays by anvil rules: no level above the normal maximum (Sharpness V, Unbreaking III), only enchantments that fit the item, and no clashing pairs such as Sharpness with Smite, Fortune with Silk Touch or Infinity with Mending. The generator caps levels and tells you which lines will fail. For Sharpness X or an impossible combo, build the item with the /give generator instead.
FAQ
Why does /enchant say the level is too high?
/enchant only goes up to an enchantment's normal maximum, like Sharpness V or Protection IV. For higher levels, give a ready-made item with /give, which accepts up to 255 on Java.
Why can't I put Sharpness and Smite on the same sword?
They are mutually exclusive, like Fortune and Silk Touch, Infinity and Mending, or the four kinds of Protection. /enchant refuses the second one; /give on Java can combine them.
Does /enchant work on Bedrock?
Yes: enchant @p sharpness 5. Bedrock uses its own names for the curses (binding, vanishing) and has no Sweeping Edge.
Can I enchant an item that already has the enchantment?
On Java the command fails if the item already has it. On Bedrock it fails once the enchantment is at its maximum level.
What are the old numeric enchantment IDs?
Java 1.12 and older used numbers: 0 Protection, 16 Sharpness, 21 Looting, 32 Efficiency, 33 Silk Touch, 34 Unbreaking, 35 Fortune, 48 Power, 51 Infinity, 70 Mending. The generator writes them for you when you pick an old version.