NapNodes

← Minecraft guides

Minecraft · updated 2 November 2026

The /give Command in Minecraft: Items With a Custom Name, Enchantments and Lore

/give is the command to give yourself (or someone else) any item in the game: a pickaxe, 64 blocks, a command block or a named, enchanted sword for the winner of an event. The confusing part is that its syntax changed in 1.20.5 and again in 1.21.5, and most of what's written out there is older: copied onto a server today, it throws an error. Here's how it's written now, what you can add to it, what each error means and how to run it from the server console.

Who can use it

/give is an operator command (level 2). In a single-player world you need cheats turned on; on a server, being op: in the console type op YourName. A normal player gets «Unknown or incomplete command».

In chat it takes a slash; in the server console, no slash and with the player's name: give Ana diamond 5. From the console @s doesn't work (the console isn't a player and answers «No player was found»), and @p looks for the player nearest to the world spawn point, which usually isn't who you want.

Rather not set it up yourself? Minecraft servers from €6 a month, no contract and a full refund within 72 hours. Or create a free Minecraft server, no card needed.

How to write it

The shape is /give <who> <item> [amount]. Without an amount, it gives one. The item goes by its ID, with or without minecraft: in front: give @s diamond_pickaxe or give @s minecraft:diamond_pickaxe.

The ID isn't always the name you see in the game. Press F3 + H in the game («Advanced tooltips: shown») and, when you hover over an item in your inventory, its ID shows under the name. There's also the Minecraft item ID list, where you search by the in-game name.

  1. To yourself

    /give @s torch 64 gives you a stack of torches.

  2. To another player

    /give Ana golden_apple 3. If Ana isn't online, you get «No player was found».

  3. To everyone online

    /give @a cooked_beef 16 gives each of them 16 steaks: it's the quick kit for starting an event.

How much you can give at once

The amount can go above 64: the game splits it into stacks. The cap is 100 stacks per command: 6400 of something that stacks to 64 (stone, torches), 1600 of something that stacks to 16 (snowballs, ender pearls) and 100 of something that doesn't stack (swords, armour). Ask for more and it answers «Can't give more than 6400 of…».

Whatever doesn't fit in the inventory drops on the ground at the player's feet. If you give 6400 of something, most of it ends up lying around: better one stack at a time, or straight into a chest.

Items that aren't in the creative menu

Some items can only be had with /give, or in the creative operator tab (in the game's «Controls», «Operator Items Tab»):

  1. Command block

    /give @s command_block. Also chain_command_block and repeating_command_block. How to use them, in the command blocks guide (in Spanish).

  2. Barrier and light

    /give @s barrier is an invisible block that can't be broken in survival: it's for fencing off areas of the spawn. /give @s light gives light without a torch (you see it in your hand; placed, you don't).

  3. Debug stick

    /give @s debug_stick changes a block's state (which way a stair faces, whether a fence connects) without breaking it. Very handy for building.

  4. Monster spawner

    /give @s spawner. It comes empty; you put a mob in it with a spawn egg in creative.

  5. A player's head

    /give @s player_head[profile="Notch"] in 1.21.5 or later. For heads with a custom texture or mob heads, the head generator.

Name, lore and more: components

Since 1.20.5, whatever an item carries is written in square brackets right after the ID, with no space: give @s diamond_sword[unbreakable={}] gives a sword that never wears out. Several components go separated by commas inside the same brackets.

A coloured name: give @s diamond_sword[custom_name={text:"Excalibur",color:"gold",italic:false}]. The italic:false is needed because names set by hand come out in italics by default. If you don't want the name to be changeable on an anvil, use item_name instead of custom_name (that one isn't italic either).

Lore (the grey lines under the name): give @s diamond[lore=[{text:"October contest prize",color:"gray",italic:false}]]. Each line is one more text in the list.

Others used a lot: max_stack_size=1 (so it doesn't stack; from 1 to 99), rarity="epic" (the name in pink) and enchantment_glint_override=true (so it shines without enchantments).

To avoid writing it by hand, the /give generator builds the command with a coloured name, lore, enchantments and unbreakable, for your version.

Enchantments and enchanted books

With /give there's no maximum level and no enchantments that exclude each other (the cap is 255): give @s netherite_pickaxe[enchantments={efficiency:5,fortune:3,unbreaking:3,mending:1}].

An enchanted book keeps its own apart, for the anvil: give @s enchanted_book[stored_enchantments={mending:1}]. With enchantments the book shines, but the anvil won't take it.

The name of each enchantment, the normal maximums and how to enchant what you're already holding, in the /enchant guide.

The three syntaxes by version

A command copied from an old video fails because the syntax changed twice. The same sword (Sharpness X, with a name) in each one:

  1. 1.21.5 or later (also the 26.x versions)

    give @s diamond_sword[enchantments={sharpness:10},custom_name={text:"Excalibur",italic:false}]

  2. 1.20.5 to 1.21.4

    give @s diamond_sword[enchantments={levels:{sharpness:10}},custom_name='{"text":"Excalibur","italic":false}']: the levels go inside levels and the name is JSON in single quotes.

  3. 1.14 to 1.20.4

    give @s diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:10s}],display:{Name:'{"text":"Excalibur","italic":false}'}}: the NBT tag in curly braces.

The usual errors

«Unknown item»: the ID is misspelled or translated (sword instead of diamond_sword), or it isn't an item. Water, lava, fire and portals are blocks without an item: you give the bucket (water_bucket, lava_bucket) or the lighter (flint_and_steel).

«Expected whitespace to end one argument, but found trailing data»: it's almost always a command from before 1.20.5, with curly braces {…} stuck to the item. Rewrite it in the bracket syntax above.

«Unknown item component» or «Malformed … component»: the component name is wrong, or it belongs to another version (levels inside enchantments, for example, no longer works since 1.21.5). Check the quotes and that every brace and bracket is closed.

«Only players may be affected by this command, but the provided selector includes entities»: you used @e. /give only gives to players; use @a, @p, @r, @s or a name.

The command is longer than 256 characters: chat won't let you type more. Paste it in the server console (without the slash) or in a command block.

If you have EssentialsX

EssentialsX brings its own /give, which takes the place of the game's one and doesn't understand components: it uses its own item names and options (give Ana diamondsword 1 sharpness:5). It goes by the essentials.give permission, not by op.

The game's one is still there under its full name: minecraft:give Ana diamond_sword[unbreakable={}]. The /give generator has a checkbox to write it that way. It also has /item (alias /i), which gives you an item. The plugin's other commands, in the EssentialsX guide.

On NapNodes

Minecraft servers run Paper on the latest version, so the 1.21.5-or-later syntax is the one that works. You type it in the panel's «Console», without the slash and with the player's name (give Ana diamond 5); that's also where you make yourself op with op YourName.

If you're going to hand out prizes at an event, make a backup in «Backups» first: if something gets out of hand, you go back. To try commands without fear, the free Minecraft server is a Paper server on the latest version where you make yourself op from the «Console».

Frequently asked questions

How do you use the /give command in Minecraft?

/give <player> <item> [amount], with the item's ID: /give @s diamond_pickaxe or /give Ana torch 64. You need to be op or have cheats turned on.

Why doesn't a /give command copied from the internet work?

Because the syntax changed in 1.20.5 and in 1.21.5. Commands with curly braces stuck to the item ({Enchantments:…}) are from before; now they go in square brackets, like give @s diamond_sword[enchantments={sharpness:5}].

How do I name an item with /give?

With the custom_name component: give @s diamond_sword[custom_name={text:"Excalibur",color:"gold",italic:false}] in 1.21.5 or later.

How many items can you give with /give?

Up to 100 stacks per command: 6400 of something that stacks to 64 and 100 of something that doesn't stack. Whatever doesn't fit in the inventory drops on the ground.

How do I get a command block?

As op: /give @s command_block. It isn't in the normal creative menu, only in the operator tab.

Shall we set it up for you?

Minecraft servers from €6 a month, never oversold: your RAM is yours alone. And if you'd rather start without paying, there's a free Minecraft server, no card needed.

Your server doesn't show up in the game? Check it in a second with “Is my Minecraft server online?”: players, version and MOTD, free. Need a player's UUID for the whitelist or permissions? Look it up here. Handing out enchanted items? Build the command with the /give generator.

Free tool: /give command generator. Items with enchantments, a coloured name and lore: the /give command written right for your Minecraft version.

Keep reading

All Minecraft guides, sorted →