Java and Bedrock command tool

Minecraft Enchant Command Generator

Build /enchant commands for the item a player is holding. Choose the game edition, player, enchantments, and normal in-game levels; the tool then creates one clear command for each enchantment you selected.

1. Set the command context

Edition

@p selects the nearest player, @s the executing entity, @a every player, and @r a random player. A command block normally has no executing entity, so @s selects nobody there; use @p or another player target.

2. Choose enchantments (0)

You may select several enchantments. Because /enchant changes one enchantment at a time, each selection produces a separate command. The item held by the target player must support every chosen enchantment.

3. Review the generated commands

The output updates as you change the target, levels, or selected enchantments. Keep the slash when pasting into chat; remove it when entering the command in a command block or server console.

Before you run the commands

The target player must hold the intended item in their main hand. Run every generated line separately. Pasting several lines together does not turn them into one Minecraft command.

Cheats or the appropriate operator permission are required. The /enchant command does not create an item, repair durability, consume XP, or bypass normal level limits and compatibility rules.

Commands succeed or fail one line at a time. An enchantment already present on the held item may make a later line fail, even when the selections shown here are compatible with one another.

Need a new item with custom enchantments instead? Use the /give Generator. For a Survival book-combining plan, use the Enchant Order Calculator.

Minecraft /enchant Command: Methods & Mechanics Comparison

Worked example

select Java 26.2, target @p, Unbreaking III, and include the slash. The output is /enchant @p minecraft:unbreaking 3. It requests Unbreaking level 3 on the nearest player’s held item; that item must accept the enchantment and its existing enchantments must be compatible.

Enchanting MethodItem Target & PositionLevel Limit EnforcementConflict Restriction RulesSurvival Anvil Penalty (PWP)Uses and Applications
/enchantItem actively held in target player's main handStrictly capped at vanilla maximum level (e.g. Sharpness V, Fortune III)Strictly rejected (e.g. cannot combine Silk Touch + Fortune)0 XP / No prior work penalty addedQuick operator equipment prep, interactive map testing, command block dispensers
/give [components]Spawns brand-new item directly into inventoryBypasses normal enchantment levels, within the selected data format’s limits (255 for modern components; 32,767 for legacy positive short levels)Completely bypassed (can stack Silk Touch + Fortune + Looting)Fresh item starts at 0 prior work penaltyCustom RPG weapons, OP boss mob drops, custom dungeon loot, server prize gear
/give [legacy NBT]Spawns brand-new item directly into inventoryLegacy enchantment levels are stored as signed shorts; the largest positive value is 32,767.Completely bypassed (can stack Silk Touch + Fortune + Looting)Fresh item starts at 0 prior work penaltyLegacy adventure map creation, pre-1.20.5 modpacks, archive server equipment
Anvil (Survival)Input slot of an in-game Anvil blockHardcapped at vanilla max level; combines matching levels (IV + IV = V)Mutually exclusive enchants refuse to merge (first book wins)Result prior-work penalty is twice the larger input penalty plus 1; Survival combinations costing 40 levels or more are rejectedLegitimate Survival progression, god-armor crafting, optimal repair cycles

What the /enchant command actually does

The /enchant command adds one enchantment to the item currently held in the target player’s main hand. It is useful for map testing, server administration, command blocks, and quickly preparing ordinary enchanted equipment without opening an anvil or enchanting table.

It still follows the game’s normal rules. The held item must support the enchantment, the requested level must be within the standard range, and mutually exclusive enchantments cannot be combined. This generator checks the selected enchantments against one another, but it cannot see the item or enchantments already present in your world.

Java and Bedrock syntax

Java uses namespaced enchantment IDs such as minecraft:sharpness. Bedrock uses its command enum names, including binding and vanishing for the two curses. Selecting the correct edition prevents a valid idea from becoming an invalid command.

Several enchantments, several commands

Minecraft accepts one enchantment per /enchant command. When you choose several compatible enchantments, the generator writes one line for each so you can run them in order without rebuilding the target and level every time.

Version-aware Java choices

The Java catalog follows checked-in vanilla data snapshots for 1.21, 1.21.5, 1.21.11, and 26.2. This keeps newer entries such as Lunge out of versions where they do not exist.

How to enchant a held item

  1. Choose Java or Bedrock. For Java, select the data version that matches the world or server.
  2. Select the player who will receive the enchantment. That player must be online and holding the intended item in their main hand.
  3. Choose one or more compatible enchantments and set each level. If you select a conflicting enchantment, the earlier choice is removed and the page explains why.
  4. Copy the output and run each line separately. Check the held item after the first command before running a long list on an important world.