Back to Tools
Command Generator

Minecraft Give Command Generator

Pick any item, name it, add lore and enchantments, and copy a /give command for Java Edition or Bedrock.

Build the item

Every option is left out of the command until you set it

Checked for Minecraft 26.3 ·

Item

Custom name

Lore

Enchantments

Durability

Java Edition command

/give @p minecraft:diamond_sword

Item components, Java 26.3 32 characters

Bedrock Edition command

/give @p diamond_sword

Target, item and amount only 22 characters

How the Minecraft /give command works

Item components, the count cap and what Bedrock leaves out

In Java Edition the command is /give <targets> <item> [count]. The target is a player name, a selector such as @p or @a, or a UUID. The item is its ID with optional data components in square brackets, item_id[component=value,...]. Components replaced the old NBT braces in 1.20.5, and Java needs permission level 2 to run the command.

This generator writes five components. custom_name takes a text component, so a plain name becomes a quoted string and a coloured one becomes {text:"Name",color:"gold"}. Renamed items show in italics unless the text sets italic:false, which is what the plain text switch adds to the name and every lore line. lore is a list of text components, up to 256 lines.

enchantments is a map from enchantment ID to level, for example {sharpness:3,knockback:2}. Through /give levels from 0 to 255 are accepted, past the normal maximum, so Sharpness 10 works. Effects beyond the intended level vary by enchantment. unbreakable={} stops the item losing durability and hides its bar, and damage is the number of uses already spent, a non-negative integer that defaults to 0, so the generator leaves it out at 0.

The count can go above one stack, but the total is capped at 100 stacks of that item. That is 6,400 stone (stack size 64), 1,600 ender pearls (16) and 100 swords (1). Past the cap the command fails with an error in 26.3, so the count field stops at the cap for the item you picked.

Bedrock's command is /give <player> <item> [amount] [data] [components]. The amount runs from 1 to 32,767 and the components object only supports can_place_on, can_destroy, item_lock and keep_on_death. Names, lore and enchantments can't be set through it, so the Bedrock line leaves them out. It needs permission level 1 and a world with cheats on. The item list comes from Java, so if Bedrock rejects an ID, check its name there.

Worked example

A diamond sword named Flame Brand in gold, Sharpness 5, Fire Aspect 2, unbreakable. Sharpness 5 and Fire Aspect 2 are the normal maximums, so no level is past the limit. The count stays at 1, so it is left off the end:

/give @p minecraft:diamond_sword[custom_name={text:"Flame Brand",color:"gold",italic:false},enchantments={sharpness:5,fire_aspect:2},unbreakable={}]

Ask for 192 golden apples and the count 192 is appended; ask for 99,999 stone and it drops to 6,400.

More Minecraft tools

Player heads, item IDs and enchantment data to go with the command

Frequently asked questions

Counts, enchantment levels and Bedrock

How do I give myself an enchanted item with a custom name? +

Put the components in square brackets after the item: /give @p minecraft:diamond_sword[custom_name={text:"Flame Brand",italic:false},enchantments={sharpness:5}]. Pick the item, type the name and add enchantments here, and the generator writes the brackets for you.

Why does my /give command say the count is too high? +

In Java Edition the count can be above the stack size, but the total is capped at 100 stacks of that item: 6,400 for stone, 1,600 for ender pearls, 100 for a sword. Past the cap the command fails with an error in 26.3. The generator clamps the count to the cap so the command always runs.

Can I use levels above the normal maximum, like Sharpness 10? +

Yes. /give accepts enchantment levels from 0 to 255 even when the normal maximum is lower, which /enchant does not allow. Effects past the intended level vary by enchantment, and some do nothing extra. This tool allows 1 to 255 and flags anything above the normal maximum.

Does the Bedrock /give command support names, lore and enchantments? +

No. Bedrock's /give takes the player, item, amount, a data value and an optional components object that only supports can_place_on, can_destroy, item_lock and keep_on_death. The Bedrock line here is the simple form: target, item and amount.

Will this work on an older server? +

Item components replaced NBT in /give from 1.20.5, and the syntax here is checked against Minecraft 26.3. Releases since 1.20.5 changed how enchantments and tooltips are written, so on an older version check the Data component format page on minecraft.wiki before pasting.