Commands / Enchanting
How to Use the /enchant Command
The /enchant command writes an enchantment straight onto your held item, no XP, no anvil, no gambling at the table. Run /enchant @p sharpness 5 and the sword is maxed in one line.
The command, line by line
- 1Hold the itemPut the tool, weapon, or armor you want to enchant in your main hand. /enchant only targets the held item.
- 2Open chat or consolePress T in-game (you need OP or cheats on), or type straight into the server console with no slash.
- 3Type the commandRun /enchant @p sharpness 5, target, enchantment ID, then level. @p hits the nearest player; use @s for yourself.
- 4Check the level capThe level must be valid for that enchant. Vanilla rejects anything above the max unless you raise it from console with a player target.
- 5Confirm the resultThe console prints "Applied enchantment Sharpness V" and the item updates instantly, no experience cost, no anvil.
What you need
Held item to enchant
Enchantment ID
Anvil (the slow way)
Table alternative
Quick answers
?
What is the full syntax?
/enchant <target> <enchantment> [level]. Example: /enchant @p sharpness 5. Level defaults to 1 if you leave it off.
?
Does it cost XP or levels?
No. /enchant is a cheat-style command, it applies the enchantment for free, unlike an enchanting table or anvil.
?
Can I enchant another player's item?
Yes. Use their name or a selector like @a, but it only affects whatever item that player is currently holding.
?
Why does it say the enchantment can't be applied?
The item must support that enchant (you can't put Sharpness on a pickaxe) and the level must be within range. Use an anvil for higher-than-vanilla levels.
?
What's the difference between /enchant and an anvil?
An anvil combines books and items and costs XP and levels. /enchant skips all of that and writes the enchantment directly, but it follows vanilla level caps.
?
How do I get Sharpness above 5?
Vanilla /enchant won't go past the max. Use /give with NBT/components, an anvil with stacked books, or a plugin like EssentialsX for over-leveled enchants.
/enchant at a glance
Syntax
/enchant <targets> <enchantment> [<level>]Who may run it
OP (L2)
What it does
Enchants the item held in a player's main hand. Only allows enchantments that are compatible with the held…
Three things /enchant is actually used for
/enchant @s minecraft:sharpness 5Puts Sharpness V on the item in your main hand, if that item can take it.
/enchant @s minecraft:efficiency 5Maxes out mining speed on the held tool without an anvil or a table.
/enchant @p minecraft:unbreaking 3Adds Unbreaking III to whatever the nearest player is holding.
/enchant sits with the player commands in Minecraft, 12 of them in total. The ones with a guide here: /effect, /experience, /gamemode, /give, /teleport, /tp, /xp.
Every command with its full argument list lives in the command reference.
Blocks and items in this guide
All 6 of these are named in the guide above, starting with Enchanted Book. Look them up in the item database.
More guides on this site
Guides that go with this one
Best Combat Enchantments
Exact enchant priority for PvE and PvP: Sharpness V against Smite V, Protection IV maths, Mending over...
How Enchanting Works in Minecraft
Deep guide to Minecraft enchanting mechanics. Covers bookshelf placement, level costs, enchantment seed...
How to Use the Teleport Command in Minecraft
Use /tp and /teleport to move players to another player, to exact coordinates, or with relative ~ ~ ~...
How to Enchant Items in Minecraft
Complete guide to enchanting in Minecraft covering enchanting tables, anvils, enchanted books, lapis...
How to Limit Tick Lag from Redstone Contraptions
Reduce redstone tick lag minecraft server performance suffers from by using ALTERNATE_CURRENT, update...
How to Use the /give Command in Minecraft
Spawn any item with /give @p diamond 64, selectors, counts, and 1.20.5+ item components for custom...
Database →
Command Reference
Syntax, arguments and examples for every command.
Database →
Enchantments
Max levels, conflicts and the best enchant combos.
Hosting →
Managed Hosting
Skip the setup: a managed server online in minutes.
Database →
Item Database
Every item with its stats, IDs, recipes and uses.
Guides →
More Server & Admin guides
Run a server: setup, hosting, permissions, worlds and crossplay.