If you have updated your map or server to Minecraft 26.x, you likely noticed that old NBT commands like /give @p diamond_sword{display:{Name:'"Excalibur"'}} no longer work! Mojang completely overhauled the item syntax by replacing unstructured NBT with type-safe Data Components.
Why Mojang Replaced NBT Tags
Old NBT tags were fragile. Different items used different tag structures, leading to bugs and slow server parsing. Data Components standardize all item data into explicit, pre-compiled properties.
Key 1.21 Component Changes
1. Custom Names & Lore
Old: {display:{Name:'{"text":"Hero Sword"}',Lore:['{"text":"Legendary"}']}}
New: [item_name='"Hero Sword"',lore=['"Legendary"']]
2. Custom Unbreakable Tag
Old: {Unbreakable:1b}
New: [unbreakable={}]
3. Custom Data Storage (NBT Storage)
All custom NBT keys that do not belong to vanilla components now go inside the custom_data component:
[custom_data={my_quest_id:42,rarity:"epic"}]
Save hours of syntax errors by building 1.21 commands visually in our 1.21 /give Command Generator!
Convert one old command at a time
- Keep a copy of the original pre-1.20.5 command.
- Identify item data such as display name, lore, enchantments, attributes, damage or custom model data.
- Move each supported value into the matching item component.
- Run the new command in a temporary world and inspect the item tooltip and behavior.
Item components replaced the old item stack NBT syntax beginning in Java Edition 1.20.5. Later versions also changed the internal shape of several components, so a command that works in 1.20.5 is not automatically guaranteed to match 1.21.5 or a 26.x release.
Know what a converter cannot infer
A mechanical converter can map known fields, but it cannot determine the intent of arbitrary custom_data, plugin-specific tags or commands embedded inside text. Test complex items separately and compare attributes, enchantment levels, food behavior and model selection. Use the NBT to Components Converter for supported mappings, then review the generated output rather than treating it as a universal migration.
