Interactive Command Builder
Minecraft /give & Enchantment Command Builder (Java 1.21+ Data Components vs. Bedrock)
In Minecraft Java 1.20.5 and 1.21+, Mojang retired curly-brace item NBT tags ({Enchantments:[...]}) and replaced them with structured square-bracket Item Stack Components ([minecraft:enchantments=...]). Use our live builder below to generate syntax that actually works on your exact build.
- Tested build / patch
- Java 1.21.4 & Bedrock 1.21.50
- Platforms verified
- PC (Java/Bedrock), PS5, Xbox, Switch
- Trophy / achievement flag
- Java Advancements Safe; Disables Bedrock Achievements Permanently
- Save-file safety
- Safe (Exceeding 255 char chat limit requires Command Block)
/give @s minecraft:netherite_sword[minecraft:enchantments={levels:{"minecraft:sharpness":5,"minecraft:unbreaking":3}}] 1
Why Most Old Minecraft /give Commands Fail in 1.21+
If you paste a command from an older tutorial into Minecraft Java 1.20.5, 1.21, or 1.21.4, Brigadier immediately highlights the curly brace in red and prints: Expected whitespace to end one argument, but found trailing data. That happens because Mojang overhauled item storage architecture by replacing monolithic SNBT blobs with typed Item Stack Components.
Three structural changes define valid 1.21+ syntax:
- Square Brackets Replace Curly Braces on the Item Argument: Component lists attach directly to the item ID using
[...]with zero spaces between the item name and opening bracket—for example,minecraft:mace[minecraft:unbreakable={}]. - Count Moved Back to the End: Unlike pre-1.13 commands (
/give @p item count damage {NBT}), modern Java syntax places the stack integer after the closing square bracket:/give <targets> <item>[components] [<count>]. - Key-Value Enchantment Maps: Instead of an array of objects
[{id:"sharpness",lvl:5s}], 1.21+ uses a clean key-value dictionary insidelevels:minecraft:enchantments={levels:{"minecraft:sharpness":5}}(and in 1.21.5+ snapshots, even the outerlevels:wrapper can be shortened directly tominecraft:enchantments={"minecraft:sharpness":5}, though the explicitlevelsobject remains compatible across 1.20.5–1.21.4).
The Bedrock Edition Limitation Nobody Mentions
Many cross-platform cheat tables falsely claim you can paste Java enchantment JSON into Minecraft Bedrock Edition on PS5, Xbox, Switch, or Windows. You cannot. Bedrock’s /give parser only accepts five JSON item components: minecraft:can_place_on, minecraft:can_destroy, minecraft:item_lock, and minecraft:keep_on_death.
To spawn enchanted gear in vanilla Bedrock without external NBT editors:
- First, run
/give @s netherite_sword 1 0to place the unenchanted item in your hotbar. - Equip the sword in your active main-hand slot (
/enchantfails if the item sits in your backpack slots). - Run
/enchant @s sharpness 5and/enchant @s unbreaking 3sequentially. Note that Bedrock enforces strict survival enchantment caps (Sharpness maxes at 5, not 255) and rejects mutually exclusive enchantments like Sharpness + Smite.
/give @s minecraft:command_block), paste the full string inside it (up to 32,500 characters), and power it with a button.
Java vs. Bedrock Command Reference Matrix
| Goal | Java 1.21.4 Exact Command | Bedrock 1.21.50 Exact Equivalent |
|---|---|---|
| Enable Commands Temporarily in Survival | Esc → Open to LAN → Allow Commands: ON (resets on quit) | Settings → Game → Activate Cheats (permanently locks Xbox/PSN achievements on that world!) |
| Give Command Block | /give @s minecraft:command_block 1 |
/give @s command_block 1 |
| Keep Item on Death | /gamerule keepInventory true (world-wide) |
/give @s diamond_pickaxe 1 0 {"minecraft:keep_on_death":{}} (per-item!) |
| Max Enchant Level Allowed | Level 255 via minecraft:enchantments component |
Vanilla anvil caps only (e.g., Sharpness 5, Looting 3) |
Worried about losing Xbox Gamerscore or PlayStation Trophies on a Bedrock Realm or local world? Read our Achievement & Trophy Lockout Mechanics Guide and clone your world folder first using our Save File Backup Guide. For other PC command engines, return to the PC Console Commands Hub.
Frequently Asked Questions
Why does /give say "Unknown item" or fail at the curly brace { in Minecraft 1.21?
Because Minecraft Java 1.20.5 removed curly-brace NBT syntax on /give and /clear commands. Replace {Enchantments:[...]} with square-bracket Data Components: [minecraft:enchantments={levels:{"minecraft:sharpness":5}}].
Does using /give in Minecraft Java Edition disable Advancements?
No. Minecraft Java Edition tracks Advancements per world inside your world/advancements JSON file and does not disable them when Allow Commands or Open to LAN is used. By contrast, toggling Activate Cheats in Bedrock Edition permanently marks level.dat and blocks Xbox/PlayStation achievements on that world.
How do I bypass the 256-character chat limit for multi-enchantment /give commands?
Run /give @s minecraft:command_block, place the block on the ground, right-click it in Creative mode (or set enable-command-block=true on a local server), paste the full command string inside the console field, and set Needs Redstone to Always Active.