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)
>_ MINECRAFT /GIVE SYNTAX WORKBENCH (1.21+ DATA COMPONENTS) Runs 100% locally in your browser
6. Toggle Enchantments & Durability Flags:
/give @s minecraft:netherite_sword[minecraft:enchantments={levels:{"minecraft:sharpness":5,"minecraft:unbreaking":3}}] 1
Java 1.20.5+ / 1.21.4 Syntax active.

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:

  1. 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={}].
  2. 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>].
  3. Key-Value Enchantment Maps: Instead of an array of objects [{id:"sharpness",lvl:5s}], 1.21+ uses a clean key-value dictionary inside levels: minecraft:enchantments={levels:{"minecraft:sharpness":5}} (and in 1.21.5+ snapshots, even the outer levels: wrapper can be shortened directly to minecraft:enchantments={"minecraft:sharpness":5}, though the explicit levels object remains compatible across 1.20.5–1.21.4).
BROKEN IN 1.21+ (Legacy 1.13–1.20.4 Curly NBT): /give @s diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:5s}],Unbreakable:1b} 1 WORKING IN 1.20.5 – 1.21.4 (Square-Bracket Item Components): /give @s minecraft:diamond_sword[minecraft:enchantments={levels:{"minecraft:sharpness":5}},minecraft:unbreakable={}] 1 Key difference: Typed component keys, integer levels (no '5s' short suffix), and empty {} unit object for unbreakable.
Figure 1: Side-by-side parser comparison between retired 1.20.4 SNBT tags and current 1.21.4 Item Stack Components.

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 0 to place the unenchanted item in your hotbar.
  • Equip the sword in your active main-hand slot (/enchant fails if the item sits in your backpack slots).
  • Run /enchant @s sharpness 5 and /enchant @s unbreaking 3 sequentially. Note that Bedrock enforces strict survival enchantment caps (Sharpness maxes at 5, not 255) and rejects mutually exclusive enchantments like Sharpness + Smite.
256-Character Chat Box Truncation Trap Minecraft’s standard T chat bar truncates input at 256 characters. When combining custom JSON names with 4+ enchantments in 1.21+, your command can easily pass 270 characters and cut off mid-bracket. Give yourself a Command Block first (/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.