A Sharpness 255 sword is one of the most powerful weapons players can create in Minecraft using commands. It is not something you can earn through normal survival enchanting, but it can be spawned in Java Edition if cheats or operator permissions are enabled.
This guide explains the command you need, which Minecraft edition it works in, and what to check if the command does not work.
Sharpness 255 Sword Command For Minecraft Java Edition
For modern versions of Minecraft Java Edition, use this command to give yourself a diamond sword with Sharpness 255:
/give @p minecraft:diamond_sword[minecraft:enchantments={levels:{"minecraft:sharpness":255}}] 1
To get a netherite sword instead, use this version:
/give @p minecraft:netherite_sword[minecraft:enchantments={levels:{"minecraft:sharpness":255}}] 1
The command gives the nearest player a sword with the Sharpness enchantment set far beyond the normal survival limit. In regular gameplay, Sharpness only goes up to Sharpness V, so this is strictly a command-only item.
Older Minecraft Java Command
If you are playing an older version of Minecraft Java Edition, the newer item component syntax may not work. Older versions commonly use this NBT-style command instead:
/give @p diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:255s}]} 1
For an older-version netherite sword command, use:
/give @p netherite_sword{Enchantments:[{id:"minecraft:sharpness",lvl:255s}]} 1
If one version of the command fails, the most likely reason is that your Minecraft version uses the other command format.
What Does @p Mean?
The @p target selector means the command will give the item to the nearest player. If you are typing the command yourself in a single-player world, that usually means the sword will be given to you.
You can also replace @p with your Minecraft username. For example:
/give PlayerName minecraft:diamond_sword[minecraft:enchantments={levels:{"minecraft:sharpness":255}}] 1
Replace PlayerName with the correct player name before running the command.
Can You Get A Sharpness 255 Sword In Survival?
No, not through normal survival gameplay. A Sharpness 255 sword is a custom command item. You cannot make one with an enchanting table, an anvil, or enchanted books in a standard survival world.
To use the command, cheats must be enabled. On a server, the player running the command usually needs operator permissions.
Does This Work In Minecraft Bedrock Edition?
This exact command is intended for Minecraft Java Edition. Bedrock Edition uses different command formatting and does not support the same Java item component or NBT syntax for creating overpowered enchanted weapons.
If you are on Bedrock Edition, the command may fail even if it is typed correctly. Most Sharpness 255 sword commands found online are written for Java Edition.
Why The Command Might Not Work
If the Sharpness 255 sword command is not working, check these common problems:
- You are using the Java command in Bedrock Edition.
- Cheats are not enabled in the world.
- You do not have operator permissions on a server.
- Your Minecraft version needs the older NBT command instead of the newer component command.
- The command was copied with missing brackets, quotes, or braces.
Command syntax is strict, so even one missing bracket can stop the item from being created.
How Strong Is Sharpness 255?
A Sharpness 255 sword is extremely powerful. It can defeat most normal mobs instantly and can completely remove the challenge from survival combat. This makes it useful for testing, creative worlds, adventure maps, and custom battles, but it is not balanced for normal survival play.
If you want a fair survival weapon, Sharpness V is the proper maximum. If you want a ridiculous weapon for experimenting, Sharpness 255 is the command version players usually look for.
Best Uses For A Sharpness 255 Sword
This kind of sword is best used when you are not trying to preserve normal survival balance. Good uses include testing mob farms, building custom boss arenas, clearing hostile mobs, experimenting with commands, or creating funny challenge videos.
It can also be useful in creative mode when you want to quickly remove mobs without switching tools or repeatedly attacking enemies.
Best Command To Try First
If you are on a recent version of Minecraft Java Edition, the best command to try first is:
/give @p minecraft:netherite_sword[minecraft:enchantments={levels:{"minecraft:sharpness":255}}] 1
If that does not work and you are playing an older Java version, try the older command:
/give @p netherite_sword{Enchantments:[{id:"minecraft:sharpness",lvl:255s}]} 1
Once the command succeeds, the sword will appear in your inventory, ready to use.

