In Minecraft Java Edition 1.21.5 and newer, use the item-component form of /give:
/give @p minecraft:netherite_sword[enchantments={sharpness:255}]
Replace the item or enchantment as needed. Vanilla Bedrock Edition does not provide a command for arbitrary level-255 enchantments.
As an Amazon Associate I earn from qualifying purchases.
Java Edition: give yourself a level-255 enchantment
Enable cheats in a single-player world, or make sure you have command permission on a server. Then run this command in chat:
/give @p minecraft:netherite_sword[enchantments={sharpness:255}]
This gives the nearest player a netherite sword with Sharpness 255. The current Java syntax places item data inside square-bracket components. Java 1.20.5 introduced this item-data system, and Java 1.21.5 changed the enchantment component format again. See the Java 1.21.5 changes for version context.
Change the item or enchantment
Replace minecraft:netherite_sword with another item and sharpness with the desired enchantment ID. For example:
/give @p minecraft:diamond_pickaxe[enchantments={efficiency:255}]
For multiple enchantments, separate entries with commas:
Rank #2
- All crafting recipes
- Data values
- Potions
- Mobs
- Patch notes
/give @p minecraft:diamond_sword[enchantments={sharpness:255,knockback:255,looting:255}]
Directly creating the item this way can also place enchantments together that normal enchanting rules treat as incompatible. That does not make the same combinations obtainable through an enchanting table or the regular /enchant command.
Why common Java commands fail
Do not use the older nested component format on Java 1.21.5 or newer:
Rank #3
/give @p minecraft:diamond_sword[enchantments={levels:{sharpness:255}}]
Use enchantments={sharpness:255} instead. The older NBT format is also outdated for current item commands:
/give @p minecraft:diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:255s}]} 1
That syntax belonged to versions before the modern item-component changes. If a command fails, first check the exact Java version and remove outdated levels or curly-brace item NBT syntax.
Rank #4
- A guide to some of the world’s most fascinating places, as seen and experienced by writer, television host, and relentlessly curious traveler Anthony Bourdain
Bedrock Edition: no vanilla level-255 command
Vanilla Bedrock does not support Java’s enchantment item component. Its documented /enchant command is:
Free tools Windows power users keep installed
One-click scans. No signup required.
/enchant <player> <enchantment> [level]
Bedrock enforces the supported ranges. Examples include Sharpness 1–5, Protection 1–4, Efficiency 1–5, Fortune 1–3, Looting 1–3, and Unbreaking 1–3. Therefore, a command such as this is not a vanilla Bedrock solution:
Best Value
/give @p minecraft:netherite_sword[enchantments={sharpness:255}]
The official Bedrock /enchant reference documents the permitted levels, while the Bedrock /give reference does not document a Java-style enchantment component for arbitrary levels.
Bedrock add-ons or external world and item editors are separate options, but they are not vanilla commands and do not use Java’s item-component syntax. The Bedrock enchantment reference lists the normal supported maximums.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What level 255 actually means
Level 255 is a command or data value, not a level available through ordinary gameplay. Enchanting tables, villager trades, loot, and normal anvil combining do not produce it; in Java, it requires command-based item creation or other data manipulation. The Minecraft enchanting reference covers normal enchantment limits.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallA stored level of 255 also does not guarantee an unlimited or perfectly 255-times-strong effect. Enchantments have individual implementation rules, and some effects cap, clamp, or become ineffective beyond their normal range. In other words, the item can contain the value even when the practical result does not scale proportionally.
Quick Recap
Quick troubleshooting checklist
- “Unknown command” or permission error: enable cheats or obtain the required server permission.
- Java syntax error: confirm that you are on Java 1.21.5 or newer and use
enchantments={sharpness:255}. - Using Bedrock: the Java command will not work in vanilla Bedrock.
- The item appears but the effect seems limited: level 255 may be stored successfully, while that particular enchantment’s mechanics cap or clamp its effect.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




