Fast Answer: The Current /give Syntax
/give <targets> <item> [<count>]
This is the complete grammar for Java Edition 1.21.5 through 26.2 (the current stable release). <targets> is a player name or selector such as @s, <item> is a namespaced item ID like minecraft:diamond_sword optionally followed by data components in square brackets, and <count> is an optional quantity. Cheats must be enabled: toggle Allow Cheats in singleplayer, hold operator status on a server, or run the command from a command block.
Every example on this page is labeled with the versions it parses on. Commands using square-bracket item components require Java 1.20.5 or later; text components written in inline SNBT form (custom_name={text:"Name"}) require 1.21.5 or later. Old commands copied from pre-1.20.5 tutorials will fail to parse on any current version.
Namespaced Item IDs Explained
Every block, item, entity, status effect, and enchantment in modern Minecraft is identified by a namespaced ID (officially called a resource location) in the format namespace:path — for example minecraft:diamond_sword. The namespace says which content pack an object comes from: vanilla content lives in the reserved minecraft namespace, while mods and data packs use their own, so mymod:gem_sword can never collide with a future vanilla item.
Only lowercase letters, digits, underscores, hyphens, and dots are valid characters. Diamond_Sword will not parse; diamond_sword will. In commands the minecraft: prefix is optional for vanilla content — the game resolves a bare diamond to minecraft:diamond automatically — but writing the full namespaced form is recommended, and the prefix is mandatory when referencing modded or data-pack content.
To find the ID of an item you are holding in Java Edition, press F3+H to enable Advanced Tooltips and hover over it. Tab-completion in the chat line also enumerates every valid ID as you type. For the full registry, browse this site's Minecraft item ID list and block IDs. Server owners can also dump the machine-readable canonical registry with the --reports flag (registries.json, items.json) — the same source data-generation tools rely on.
Why numeric IDs died: The Flattening (1.13)
Before Java Edition 1.13, blocks used numeric IDs from 0–255 plus a 4-bit metadata value, and items used numeric IDs starting at 256 — the diamond sword was item 276, and /give @p 276 1 0 was a valid command. The scheme was hard-capped at 256 block IDs and forced completely different blocks (all six plank types, all sixteen wool colors) to share one ID distinguished only by metadata.
In snapshot 17w47a for 1.13, Mojang executed "The Flattening": metadata was replaced by explicit block states, and every variant received its own namespaced ID — wool with data value 14 became minecraft:red_wool, stone:1 became minecraft:granite. From 1.13 onward, namespaced identifiers are the only accepted form and numeric IDs were removed entirely. If an old tutorial hands you a number, translate it with this site's legacy 1.12 ID list.
/give Syntax Evolution: NBT Braces → Data Components
Item customization in /give has been through three breaking eras. If a command from an old tutorial fails to parse, this table is almost certainly the reason — match the syntax to your game version.
| Feature | ≤1.12.2 (numeric + NBT) | 1.13–1.20.4 (NBT) | 1.20.5–1.21.4 (components) | 1.21.5+ / 26.x (components, SNBT text) |
|---|---|---|---|---|
| Plain sword | /give @p 276 1 0 | /give @s minecraft:diamond_sword | /give @s minecraft:diamond_sword | /give @s minecraft:diamond_sword |
| Sharpness V | {ench:[{id:16s,lvl:5s}]} | {Enchantments:[{id:"minecraft:sharpness",lvl:5s}]} | [enchantments={levels:{"minecraft:sharpness":5}}] | [enchantments={"minecraft:sharpness":5}] |
| Custom name | {display:{Name:"Excalibur"}} | {display:{Name:'{"text":"Excalibur"}'}} | [custom_name='{"text":"Excalibur"}'] | [custom_name={text:"Excalibur",italic:false}] |
| Lore | {display:{Lore:["A legend"]}} | {display:{Lore:['{"text":"A legend"}']}} | [lore=['{"text":"A legend"}']] | [lore=[{text:"A legend",italic:false}]] |
| Unbreakable | {Unbreakable:1b} | {Unbreakable:1b} | [unbreakable={}] | [unbreakable={}] |
| Dyed leather | {display:{color:16711680}} | {display:{color:16711680}} | [dyed_color=16711680] | [dyed_color=16711680] |
| Player head | {SkullOwner:"MHF_Sheep"} | {SkullOwner:"MHF_Sheep"} | [profile={name:"MHF_Sheep"}] | [profile={name:"MHF_Sheep"}] |
1.20.5 (Armored Paws, April 2024) replaced the unstructured NBT tag on items with structured, load-time-validated data components. The old {...} syntax was removed from the item argument outright, and every legacy tag (display.Name, Enchantments, Unbreakable, SkullOwner, Potion, …) was mapped to a named component. Broken commands now fail loudly at parse time instead of silently producing broken items.
1.21.5 (Spring to Life, March 2025) added two further breaking tweaks that many "1.20.5 component" tutorials miss: text components are no longer JSON wrapped in a string (custom_name='{"text":"Name"}' became custom_name={text:"Name"}), and the enchantments map was flattened from {levels:{"minecraft:sharpness":5}} to {"minecraft:sharpness":5}.
Version numbering note: the 1.x line ended with 1.21.11 (December 2025). Releases are now year-based — 26.1 ("Tiny Takeover") and 26.2 ("Chaos Cubed") in 2026 — and the 1.21.5+ component syntax applies unchanged. Read "1.21.5+" on this page as "1.21.5 through 26.2 and later".
Bottom line: if your game is 1.21.5 or newer (including every 26.x release), only the right-hand column works — namespaced ID, square-bracket components, SNBT text. The older columns exist here purely to help you translate commands copied from outdated tutorials.
Component cheat sheet (1.21.5+ / 26.x)
| Component | Purpose | Minimal example |
|---|---|---|
minecraft:enchantments | Active enchantments as an ID→level map (levels 0–255) | [enchantments={"minecraft:sharpness":5}] |
minecraft:stored_enchantments | Same map, for enchanted books (inert until applied at an anvil) | [stored_enchantments={"minecraft:sharpness":5}] |
minecraft:custom_name | Anvil-style name (SNBT text component) | [custom_name={text:"Magic Wand",italic:false}] |
minecraft:lore | Extra tooltip lines, a list of SNBT text components | [lore=[{text:"The cake is a lie!"}]] |
minecraft:unbreakable | Never loses durability; empty object | [unbreakable={}] |
minecraft:dyed_color | RGB tint for dyeable items (int, hex, or float list) | [dyed_color=0x7FFF33] |
minecraft:profile | Skin/name source for player heads | [profile={name:"MHF_Sheep"}] |
minecraft:potion_contents | Potion type, custom color, custom effects | [potion_contents={potion:"minecraft:night_vision"}] |
minecraft:damage / minecraft:max_damage | Durability consumed / maximum durability | [damage=500] |
minecraft:max_stack_size | Stack size override, 1–99 | [max_stack_size=64] |
minecraft:custom_data | Free-form data for maps and data packs | [custom_data={foo:1}] |
minecraft:enchantment_glint_override | Force or suppress the enchantment glint | [enchantment_glint_override=true] |
minecraft:rarity | Name color tier | [rarity=epic] |
Bottom line: you rarely need more than five of these — enchantments, custom_name, lore, unbreakable, and dyed_color cover the overwhelming majority of custom-item commands. Any component you omit falls back to the item type's default, and prefixing a component name with ! removes a default you do not want.
🎮 Give Command Generator
Pick an item, choose a target, set the quantity, and get a ready-to-paste /give command with the correct component syntax. Works with every item in our catalog.
Give Command Recipes (1.21.5+ / 26.x Component Syntax)
All recipes below parse on Java Edition 1.21.5 through 26.2. On 1.20.5–1.21.4, wrap text values as JSON strings instead (custom_name='{"text":"..."}'). Chat input is capped at 256 characters — anything longer belongs in a command block, which accepts tens of thousands.
Enchanted items
A netherite sword with Sharpness V, Mending, and Unbreaking III. The enchantments component is a flat map of enchantment ID to level, and levels 0–255 are accepted — sharpness:10 legitimately produces "Sharpness X", something /enchant will never do because that command enforces normal maximum levels.
An enchanted book holding Mending. Books use stored_enchantments; the enchantment stays inert until combined at an anvil.
Custom name and lore
custom_name renders in italics by default (anvil-renamed style), so italic:false is the standard trick for a clean name. Lore accepts up to 256 lines. The alternative item_name component never renders italic and cannot be removed at an anvil — useful for map-making.
Dyed leather armor
The color is a packed RGB integer — 16711680 is pure red. Hex (0xFF0000) and 0–1 float-list ([1.0,0.0,0.0]) forms also parse. Works on leather armor, leather horse armor, and wolf armor — anything in the #minecraft:dyeable item tag.
Player heads
The profile component replaces the old SkullOwner tag and accepts a player name (resolved to a skin at runtime), a UUID, or raw base64 texture properties for fully custom heads. The MHF_* accounts are Mojang's stable decoy heads, making them the safest choice for adventure maps. A name-only shorthand, profile="MHF_Sheep", also parses.
Potions
Vanilla potion types are their own registry (long_night_vision, strong_leaping, luck, …).
A fully custom brew: a recolored splash potion of Wither II for every player. Durations are in ticks (3600 ticks = 3 minutes).
Unbreakable and reshaped items
The old Unbreakable:1b flag became the empty unbreakable={} component.
Components can do things NBT never could — here, totems that stack to 64.
The enchantment glint without any enchantment — handy for map rewards.
An official wiki example and the extreme case: a grass block that works as a pickaxe. Components can reshape an item's stack size, durability, and tool behavior in ways NBT never could.
Bottom line: every recipe above is the same pattern — namespaced ID, then square brackets, then comma-separated component=value pairs. Start from the closest recipe, swap the ID and values, and let parse-time validation catch your mistakes; if a command grows past 256 characters, move it into a command block.
Common /give Errors and Fixes
Old NBT syntax on a new version
The single most common failure: pasting a 1.19-era command into a 1.20.5+ client. The parser rejects the {...} tag entirely because tags like Enchantments no longer exist. The fix is mechanical: move every tag into its component equivalent inside [...], as tabulated above.
A subtler variant hits players on 1.21.5+ who copy a "new" 1.20.5 tutorial: custom_name='{"text":"Name"}' now fails, because text components must be inline SNBT (custom_name={text:"Name"}).
Also check for pre-1.13 leftovers: a numeric ID or damage value such as /give @p 276 1 0 or /give @p wool 1 14 cannot work — Java has had no numeric item IDs since The Flattening, and variants like red wool are separate IDs (minecraft:red_wool).
✗ Weak — parses only on 1.13–1.20.4. On 1.20.5 and later the curly-brace NBT tag is rejected outright.
✓ Strong — the same Sharpness V sword in current component syntax (1.21.5–26.x): a flat ID→level map inside square brackets.
Namespace and spelling mistakes
Identifiers are case-sensitive and lowercase-only: Diamond_Sword, minecraft:dyamond_sword, and miecraft:diamond_sword all fail to parse, while diamond_sword (implicit minecraft namespace) and minecraft:diamond_sword both succeed. When a command references data-pack or modded content, the namespace is compulsory — /give @s gem_sword will never resolve to mymod:gem_sword.
Because component values are validated at parse time in 1.20.5+, an invalid value like [damage=-34] fails immediately rather than silently producing a broken item. Tab-completion is your friend: it suggests item IDs and component names (though not component values) as you type.
Stack limits and count errors
The trailing <count> argument accepts 1 to 2,147,483,647, but since 1.17 /give refuses to hand out more than 100 stacks' worth per execution — /give @s minecraft:diamond 6401 (just over 100×64) fails.
Overriding max_stack_size is capped at 99, and it is mutually exclusive with max_damage (an item cannot both stack and have durability). In 26.1+, a stack with conflicting data — a count above its max_stack_size, for instance — is treated as empty in many contexts, so sloppy component combinations can produce ghost items. Finally, remember the 256-character chat limit: long component stacks belong in a command block.
Bedrock vs Java differences
Bedrock Edition's /give is a different command with a different grammar — give <player: target> <itemName: Item> [amount: int] [data: int] [components: json] — and none of the component recipes on this page run there:
| Topic | Java Edition | Bedrock Edition |
|---|---|---|
| Item data in /give | Full data components: diamond_sword[enchantments={...}] | No NBT/component item syntax; only 4 JSON item components (can_place_on, can_destroy, item_lock, keep_on_death) |
| Legacy data values | Gone since 1.13 | The data: int argument still exists (e.g. /give @a potion 1 5) |
| Enchanted items | Inline in one /give | Give the item, hold it, then /enchant |
| Custom names/lore via command | custom_name, lore components | Not possible via /give at all |
| Effect/enchantment IDs | Namespaced (minecraft:speed) | Unnamespaced (speed) |
Bedrock did adopt namespaced string IDs, so minecraft:diamond_sword is portable between editions — only the data syntax differs. A converted Java component command still will not run on Bedrock, and Bedrock's JSON item components are not valid Java syntax.
Bottom line: only the bare namespaced ID crosses editions. Everything in square brackets on this page is Java-only; on Bedrock, give the plain item and use /enchant or an anvil for the rest.
Bottom line: nine out of ten /give failures are one of three things — old curly-brace NBT on a 1.20.5+ client, a casing or spelling slip in the ID, or a count above 100 stacks. Check those three against the parse error first, and consult the Bedrock table if you are not on Java Edition.
Related Commands That Use IDs
The same ID rules power every other content command. A quick reference — entity NBT still uses curly braces, because the 1.20.5 component migration applied to item stacks only:
/summon — entity IDs
Grammar: summon <entity> [<pos>] [<nbt>]. The entity argument is a namespaced entity-type ID from our entity ID list. Build complex spawns visually with the Summon Generator.
An item stack embedded in entity NBT uses the saved item format: id, count, and a components map — the components form requires 1.20.5+, while plain entity NBT like the first example parses from 1.13 through 26.x.
/setblock — block IDs and block states
Grammar: setblock <pos> <block> [destroy|keep|replace|strict], where <block> is block_id[block_states]{nbt}. Block states in square brackets predate (and are unrelated to) item components; the strict placement mode was added in 1.21.5. Try the Setblock Command Generator.
/effect — status effect IDs
Grammar: effect give <targets> <effect> [<seconds>] [<amplifier>] [<hideParticles>]. The effect is a namespaced ID from our effect ID list. The infinite keyword (added 1.19.4) grants a permanent effect; the amplifier is zero-based — Speed II is amplifier 1 — and is capped at 255 since 1.20.5. Try the Effect Command Generator.
/enchant — enchantment IDs
Grammar: enchant <targets> <enchantment> [<level>] — enchants the item in the target's main hand, with anvil-style restrictions: the level cannot exceed the enchantment's normal maximum and incompatible combinations fail. Because /enchant enforces these limits while /give's enchantments component bypasses them (levels up to 255), the two commands are complementary: /enchant for legitimate upgrades, /give for custom "god items". IDs are on the enchantment ID list.
Quick Reference Card
| Task | Command (Java 1.21.5+ / 26.x) |
|---|---|
| Basic give | /give @s minecraft:diamond_sword 1 |
| Sharpness X sword | /give @r minecraft:diamond_sword[minecraft:enchantments={"minecraft:sharpness":10}] 1 |
| Named, non-italic | /give @s minecraft:stick[minecraft:custom_name={text:"Magic Wand",color:"light_purple",italic:false}] |
| With lore | /give @s minecraft:diamond_sword[minecraft:lore=[{text:"A legend",italic:false}]] 1 |
| Red leather tunic | /give @s minecraft:leather_chestplate[minecraft:dyed_color=16711680] 1 |
| Player head | /give @s minecraft:player_head[minecraft:profile={name:"MHF_Sheep"}] 1 |
| Strength II potion | /give @s minecraft:potion[minecraft:potion_contents={potion:"minecraft:strong_strength"}] 1 |
| Unbreakable pick | /give @s minecraft:diamond_pickaxe[minecraft:unbreakable={}] 1 |
| Mending book | /give @s minecraft:enchanted_book[minecraft:stored_enchantments={"minecraft:mending":1}] 1 |
| Stack of 64 totems | /give @s minecraft:totem_of_undying[minecraft:max_stack_size=64] 64 |
| Custom NBT data | /give @s minecraft:stick[minecraft:custom_data={my_map:{key:1b}}] |
| Glint without enchant | /give @s minecraft:stick[minecraft:enchantment_glint_override=true] |
Bottom line: this card is the whole page compressed — every command here parses on Java 1.21.5 through 26.2. For 1.20.5–1.21.4 only the rows with text components need rewriting into JSON-string form.