Minecraft Give Command Generator
Pick the target, item and count, add a name, lore, enchantments and Unbreakable, and get a /give command. It is written as NBT or as data components, depending on the version you select.
Select Item
Item Details
Enchantments
Please add enchantments
/give @p minecraft:diamond_sword 1Diamond Sword
minecraft:diamond_sword
What this generator does
Search for an item, then set its name, multi-line lore, enchantments with levels (1 to 255), Unbreakable and tooltip hiding, and it builds the /give command. /give comes in four formats depending on the version: 1.12 and older put the data value and NBT after the count, 1.13 to 1.20.4 put NBT in braces right after the item ID, 1.20.5 to 1.21.4 use components in square brackets with JSON text, and 1.21.5+ use SNBT text and tooltip_display. Selecting a version applies these differences automatically, and on 1.12 and older enchantments are converted to numeric IDs. The share link sends the same settings to someone else.
Command Usage Examples
1. Apple that gives Speed when eaten
Eating the apple gives Speed II for 30 seconds (600 ticks). From 1.21.2 effects on eating go in the on_consume_effects of the consumable component, not in food. On 1.20.5 to 1.21.1 they go in the effects of the food component, and 1.20.4 and older have no way to put effects on an item, so give them separately with /effect.
/give @p apple[consumable={on_consume_effects:[{type:"minecraft:apply_effects",effects:[{id:"minecraft:speed",amplifier:1,duration:600}]}]}] 1/give @p apple[food={nutrition:4,saturation:2.4,effects:[{effect:{id:"minecraft:speed",amplifier:1,duration:600},probability:1.0}]}] 12. Pickaxe that only breaks glass and iron doors in Adventure mode
A player in Adventure mode can break only the listed blocks with this pickaxe (no effect in Survival or Creative). From 1.21.5 the block condition goes directly in can_break; on 1.20.5 to 1.21.4 the same condition goes inside a predicates list.
/give @p diamond_pickaxe[can_break={blocks:["minecraft:glass","minecraft:iron_door"]}] 1/give @p diamond_pickaxe{CanDestroy:["minecraft:glass","minecraft:iron_door"]} 13. Paper that glints without enchantments
From 1.20.5 enchantment_glint_override turns on the glint without any enchantment. 1.20.4 and older have no such option, so the usual trick is to add an enchantment that does nothing on paper (Unbreaking) and hide the enchantment line with HideFlags:1.
/give @p paper[enchantment_glint_override=true] 1/give @p paper{Enchantments:[{id:"minecraft:unbreaking",lvl:1s}],HideFlags:1} 14. Unbreakable named sword with an enchantment
A golden sword with a name, Unbreakable and Fire Aspect II. Custom names are italic by default, so italic:false is added. From 1.21.5 the name is SNBT text and enchantments are written without levels. On 1.20.4 and older use display.Name, Unbreakable:1b and an Enchantments list as NBT in braces.
/give @p golden_sword[custom_name={text:"Excalibur",color:"gold",italic:false},unbreakable={},enchantments={"minecraft:fire_aspect":2}] 1/give @p golden_sword[custom_name='{"text":"Excalibur","color":"gold","italic":false}',unbreakable={},enchantments={levels:{"minecraft:fire_aspect":2}}] 15. Crown that raises max health
Worn on the head, it adds 20 max health (10 hearts). Adding attribute modifiers replaces the item's default modifiers, so this helmet loses its normal 2 armor. On 1.20.5 to 1.21.4 the list goes inside modifiers, and 1.20.5 to 1.20.6 use uuid and name instead of id. Attribute names on 1.21.1 and older carry the generic. prefix.
/give @p golden_helmet[attribute_modifiers=[{type:"minecraft:max_health",id:"custom:crown_health",amount:20,operation:"add_value",slot:"head"}]] 1/give @p golden_helmet{AttributeModifiers:[{AttributeName:"generic.max_health",Name:"crown_health",Amount:20,Operation:0,UUID:[I;1,2,3,4],Slot:"head"}]} 1/give changes by version (Java Edition)
When a /give command from an old tutorial errors on a current version, or loses its name or enchantments, it is usually because of these changes.
| Version | Change |
|---|---|
| ~ 1.12 | Order is /give <target> <item> <count> <data value> {NBT}. The name (display.Name) is a plain string, and enchantments go in an ench list with numeric IDs. |
| 1.13 | Data values were removed and NBT is attached right after the item ID (/give <target> <item>{NBT} <count>). Enchantments go in an Enchantments list with IDs like minecraft:sharpness, and names are JSON text. |
| 1.14 | Lore is also written as JSON text. |
| 1.20.5 | Item NBT was replaced by data components, written as item[component=value]. HideFlags was split into per-component show_in_tooltip plus hide_additional_tooltip and hide_tooltip. |
| 1.21 | uuid and name were removed from attribute_modifiers; each modifier is identified by a single ID such as custom:crown_health. |
| 1.21.2 | Effects on eating moved from food to the consumable component, and attribute IDs lost the generic. prefix. |
| 1.21.5 | Names and lore became SNBT text instead of JSON strings. The levels level of enchantments, modifiers of attribute_modifiers and predicates of can_break were removed, and show_in_tooltip and the like were replaced by a single tooltip_display. |
How we checked: the change history is based on the official Minecraft changelogs (18w43a for 1.14, 1.20.5, 1.21, 24w34a for 1.21.2, 1.21.5). Item and enchantment lists and attribute IDs are extracted from the official server jar's data generator reports, and FAQ error messages are quoted from the game's language file (en_us). Last checked: November 2026.
Useful values
Values people look up most often when making custom items. All for Java Edition.
1. 1.20.4 NBT → 1.20.5 components
· display.Name → custom_name · display.Lore → lore · Unbreakable:1b → unbreakable · Enchantments → enchantments · CanDestroy → can_break, CanPlaceOn → can_place_on · AttributeModifiers → attribute_modifiers · HideFlags → show_in_tooltip on each component (tooltip_display from 1.21.5)
2. Hiding tooltip lines
· 1.20.4 and older: add up the values in HideFlags. 1 = enchantments, 4 = Unbreakable, 32 = other information, 128 = armor trim (1.19.4+) · 1.20.5 to 1.21.4: show_in_tooltip:false on each component, hide_additional_tooltip for other information · 1.21.5+: list the component IDs to hide, such as minecraft:enchantments, in hidden_components of tooltip_display; hide_tooltip:true hides the whole tooltip
3. Count and level limits
· One command can give up to 100 times the max stack size: 6,400 for items that stack to 64, 1,600 for items that stack to 16 (snowballs etc.), 100 for unstackable items · If the inventory is full, the rest drops at the receiving player's feet. · From 1.20.5, levels in the enchantments component go up to 255.
Frequently Asked Questions (FAQ)
Q. I get the error Unknown item 'minecraft:...''
A. The item ID is misspelled or the item does not exist in that version. Data values were removed in 1.13, so instead of the old wool 14 you use a separate ID for each colour or type, such as red_wool. The generator list only shows items of the selected version.
Q. I get the error Unknown item component '...''
A. On 1.20.5+ the component name in square brackets is misspelled, or the component does not exist yet in that version. For example tooltip_display exists from 1.21.5 and consumable from 1.21.2. Putting old NBT names (Unbreakable, display) inside the brackets also causes this error.
Q. I get the error Malformed '...' component
A. The component name is right but the value format does not match the version. A common cause is using the 1.20.5 style on 1.21.5+, such as levels inside enchantments or wrapping attribute_modifiers in modifiers. The message also shows which part is wrong.
Q. I get the error Can't give more than ... of ...
A. You exceeded the per-command limit (100 times the max stack size). That is 6,400 diamonds, or 100 for unstackable items such as swords. Split it into several commands if you need more.
Q. Commands with NBT in braces from old tutorials do not work on 1.20.5+.
A. From 1.20.5 the braces NBT after the item is replaced by components in square brackets. For example Unbreakable:1b becomes unbreakable and display.Name becomes custom_name. Use the mapping table below, or select your version in the generator and rebuild the command.
Q. On 1.21.5+ the item name shows braces and quotes.
A. From 1.21.5 custom_name and lore are read as SNBT text, not as JSON strings, so JSON wrapped in single quotes is treated as plain text. Write text and color directly without quotes, as in example 4.
Q. My custom item name is shown in italics.
A. Names set with custom_name (display.Name on 1.20.4 and older) are italic by default, like names given on an anvil. Add italic:false to the text to make it upright. The same applies to lore.
Q. On 1.21.2+ I put effects in the food component but eating does nothing.
A. From 1.21.2 effects on eating must go in on_consume_effects of the consumable component. food only keeps the nutrition and saturation values. Use the format from example 1.
Q. The command is too long for the chat box.
A. Chat accepts only 256 characters. Get a command block (/give @p command_block), paste the command and power it with redstone to run long commands. On a server, enable-command-block in server.properties must be true.