/give Command Generator
BetaBuild a custom item, watch its tooltip update as you go, and copy a /give command written for your exact Minecraft version — or describe the item and let the AI fill the form.
Describe it — AI writes the command
Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.
Checking the AI…
Paste a command— edit it here or move it to another version
Your command · Java 26.3
192 characters/give @p minecraft:diamond_sword[custom_name={text:"Excalibur",color:"gold",bold:true,italic:false},lore=[{text:"Pulled from the stone"}],enchantments={"minecraft:sharpness":5},unbreakable={}]
Raw editor
How it works
The same sword needs a different command depending on your version, which is why copied commands so often fail with “Expected whitespace”. The generator writes the format your version reads:
Java 1.13 to 1.20.4: NBT tags
give @p minecraft:diamond_sword{display:{Name:'{"text":"Excalibur","italic":false}'},Enchantments:[{id:"minecraft:sharpness",lvl:5s}],Unbreakable:1b}Java 1.20.5 to 1.21.4: item components
give @p minecraft:diamond_sword[custom_name='{"text":"Excalibur","italic":false}',enchantments={levels:{"minecraft:sharpness":5}},unbreakable={}]Java 1.21.5 and later (26.x too)
Text is written as SNBT instead of a JSON string, and enchantments lost the levels wrapper:
give @p minecraft:diamond_sword[custom_name={text:"Excalibur",italic:false},enchantments={"minecraft:sharpness":5},unbreakable={}]Attribute modifiers
Modifiers add stats like attack damage, max health, speed or size (scale, 1.20.5+) while the item is in a slot. Their format changed four times. Before 1.16 the names are camelCase (generic.attackDamage) with UUIDMost/UUIDLeast; 1.16 to 1.20.4 use generic.attack_damage and an int-array UUID; 1.21 swapped the UUID for an id; 1.21.2 dropped the generic. prefix; 1.21.5 removed the modifiers wrapper. The same +10 attack damage in the main hand:
# 1.20.4
give @p minecraft:diamond_sword{AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:10d,Operation:0,UUID:[I;1,2,3,4],Slot:"mainhand"}]}
# 1.21.4
give @p minecraft:diamond_sword[attribute_modifiers={modifiers:[{type:"minecraft:attack_damage",id:"minecraft:attack_damage",amount:10,operation:"add_value",slot:"mainhand"}]}]
# 1.21.5 and 26.x
give @p minecraft:diamond_sword[attribute_modifiers=[{type:"minecraft:attack_damage",id:"minecraft:attack_damage",amount:10,operation:"add_value",slot:"mainhand"}]]Adding modifiers replaces the item’s own ones, so a sword with only +10 attack damage hits for 11 (10 plus your fist), not 17. Old NBT has no “either hand” or “any armour slot”, so the generator writes one modifier per slot there.
Trims, dye, food and tools
Armour trims are Trim:{…} from 1.20 and trim={…} from 1.20.5. Leather dye is display.color in NBT, dyed_color={rgb:…} from 1.20.5 and a plain number from 1.21.5. Item name, rarity, stack size, max durability, food and mining rules need 1.20.5 or later; from 1.21.2 food also needs a consumable component to be eaten, fire resistance became damage_resistant, and gliders, equip slots, use cooldowns and enchantability arrived:
give @p minecraft:diamond[food={nutrition:4,saturation:2.4,can_always_eat:true},consumable={},equippable={slot:"head"}]Hiding tooltip lines
Before 1.20.5 a HideFlags number hides lines. From 1.20.5 each component takes show_in_tooltip:false (which can only hide modifiers you add, not a sword’s own damage lines). From 1.21.5 one tooltip_display component lists everything to hide.
Bedrock
Bedrock’s /give takes an amount, a data value and a small set of JSON components: can_place_on, can_destroy, item_lock and keep_on_death. It cannot set a name, lore, enchantments, attributes, trims or dye, so the generator adds /enchant lines to run while the player holds the item and lists what it left out.
Item names
Java shows custom item names in italics unless the name says italic:false. The generator writes that for you; press the italic button if you want the slanted look. The item list for each version comes from the game’s own data, so you are warned when an item was renamed (grass became short_grass in 1.20.3) or does not exist yet.
FAQ
Why does my /give command say “Expected whitespace”?
The command was written for another version. Java 1.20.5 replaced item NBT in curly braces with components in square brackets, and 1.21.5 changed text from JSON strings to SNBT. Pick your version in the generator and copy the command again.
How do I give an item with a custom name and colour?
Type the name, pick a colour and styles, and copy the command. On Java the name goes into custom_name (or display.Name before 1.20.5). Bedrock's /give can't name items: rename it on an anvil instead.
How do I give a sword with more attack damage?
Open Attribute modifiers, add attack_damage with an amount and the Main hand slot. The modifier replaces the sword's own damage, so add its base value too if you want to keep it (a diamond sword's is 6). Attribute modifiers are Java only.
Can I give armour that is already trimmed or dyed?
On Java, yes: pick a trim pattern and material (1.20 or later) and a dye colour for leather or wolf armour. Bedrock's /give can't do either, so use a smithing table or a cauldron there.
Can I give enchantments above the normal maximum?
On Java, yes: /give accepts levels up to 255, so Sharpness 10 works. On Bedrock the /enchant command refuses levels above the enchantment's normal maximum.
Does the chat accept long commands?
The chat box takes 256 characters. Longer commands (an item with lots of lore or modifiers, for example) must go in a command block, which takes up to 32,767. The generator warns you when a command is too long for chat.