mcanvil

Java Edition · Minecraft 26.2

Minecraft Give Command Generator

Build, validate and import modern /give commands with versioned items, enchantments, custom names and lore.

  • 1,500+ item IDs
  • Modern components
  • Command importer
  • Local-only inputs
Try a preset
Import or validate an existing command

minecraft:diamond_sword

1–6400 (a single /give delivers up to 100 stacks of the item).

Your /give command

/give @p minecraft:diamond_sword

Paste into the chat box (with the leading /) or a command block (drop the /). Uses the latest Java Edition component syntax.

Command structure

Target
@p
Item
minecraft:diamond_sword
Count
1
Components
none

Compatibility

✓ Current Java item-component syntax

Requires commands enabled or operator permission. Not a Bedrock command.

Jump to a section

The /give command puts any of Minecraft’s 1,537 items straight into a player’s inventory — already enchanted, renamed, or made unbreakable if you want. Writing it by hand is fiddly, because since Minecraft 1.20.5 the extra data lives in item components written in square brackets, and the exact syntax has kept changing between versions. This generator builds the command for you using the component syntax for 26.2, so what you copy actually runs.

The basic /give syntax

Every give command follows the same shape:

/give <target> <item>[<components>] [count]
  • target — who receives the item. Use a selector (@p nearest player, @s yourself, @a everyone, @r a random player) or a player’s exact username.
  • item — the namespaced id, e.g. minecraft:diamond_sword. The minecraft: prefix is optional in chat but this tool always includes it so the command is unambiguous.
  • components — optional [ ... ] data such as enchantments or a custom name (covered below).
  • count — how many to give. A single command delivers up to 100 stacks of the item (6,400 for a normal item). Leave it off for one.

So handing every player a stack of oak planks is simply /give @a minecraft:oak_planks 64.

Validate or update an existing command

Paste a command into the importer above to check each structural segment: command name, target, item ID, component list and count. A valid modern command is decoded back into the same fields, including escaped quotes, commas and backslashes in names or lore. If parsing fails, the validator reports the affected segment and character position instead of giving a generic “invalid command” message.

A practical troubleshooting checklist

If a generated command is red in chat, check the error position before changing the whole command. A failure near the item usually means that the ID belongs to another version or a mod namespace. A failure immediately after the item often means the server expects a different component format. Errors inside a custom name or lore entry are commonly caused by copying smart quotes or by losing an escape character while editing the command by hand. Re-importing the edited command above isolates the affected segment.

  • Confirm that the game is Java Edition and that its version matches the version shown at the top of this page.
  • In chat, keep the leading slash. In a command block, paste the command without it.
  • Make sure cheats are enabled in a local world or that you have sufficient operator permission on the server.
  • Test with @s and one item first, then restore the intended target and count.
  • On Paper, Fabric, Forge or another modified server, check whether a plugin intercepts or replaces the vanilla command parser.

The validator covers the components this form can safely round-trip. Rejecting an unknown component is intentional: silently dropping data could turn a valuable or server-specific item into a different command that still looks valid.

The importer deliberately refuses to discard information it cannot edit. Unsupported data components, unknown IDs, an obsolete levels:{} wrapper and legacy Enchantments NBT produce a visible error; they are never silently rewritten into a different item. Commands generated here are also round-trip tested: build → parse → build must return the same command.

Adding enchantments

Enchantments go in the enchantments component as a plain map of enchantment → level. A fully kitted netherite sword looks like this:

/give @p minecraft:netherite_sword[enchantments={sharpness:5,unbreaking:3,mending:1}]

This is the part most outdated generators get wrong. Before 1.20.5 enchantments were old NBT, written {Enchantments:[{id:"minecraft:sharpness",lvl:5s}]}; some tools still print that and the modern game rejects it. The current format is the flat map above — no Enchantments tag, no levels:{} wrapper, no s suffix on the number. Through the command you can put any enchantment on any item, even combinations the enchanting table would never allow, so this tool lets you pick freely.

Unbreakable, custom names and lore

Three more components cover almost every “custom item” you see on servers:

  • Unbreakable — the item never loses durability. It is an empty component: /give @p minecraft:elytra[unbreakable={}].
  • Custom name — a coloured display name. This tool also sets italic:false so the name doesn’t render in the default rename italics. For example, a gold-named stack of diamonds: /give @p minecraft:diamond[custom_name={text:"Loot",color:"gold",italic:false}] 64.
  • Lore — the small description lines under the name. Each line you type becomes one entry in the lore list.

All of these stack: add an enchantment, an unbreakable flag, a name and lore at once and the generator assembles them into a single valid command in the correct order.

Popular /give commands

A few commands players look up constantly — each generated for 26.2, so you can copy them straight out (or open the tool above and tweak):

  • Command block (not in the survival inventory):
    /give @p minecraft:command_block
  • Maxed netherite chestplate:
    /give @p minecraft:netherite_chestplate[enchantments={protection:4,unbreaking:3,mending:1}]
  • Unbreakable elytra:
    /give @p minecraft:elytra[unbreakable={}]
  • 64 enchanted golden apples:
    /give @p minecraft:enchanted_golden_apple 64
  • Overpowered sword:
    /give @p minecraft:netherite_sword[enchantments={sharpness:255,unbreaking:3},unbreakable={}]
  • Stack of totems of undying:
    /give @p minecraft:totem_of_undying 64

Note the overpowered sword: in command form you can push an enchantment far past its normal cap — Sharpness only reaches level 5 in survival, but commands can apply much higher levels (this tool goes up to 255). Going past the survival maximum on purpose is usually the whole point of a custom item.

Why “latest version” matters here

Item components are the most version-sensitive corner of Minecraft commands. Mojang has renamed and restructured them several times since they were introduced, which is why a give command copied from an old YouTube video or a stale generator often throws a red parsing error. mcanvil syncs its item and enchantment data directly from the open-source Minecraft data for 26.2 and regenerates these commands from it, so the syntax here tracks the live game instead of a snapshot frozen years ago.

Where to run the command

Paste it into the chat box keeping the leading /, or into a command block with the / removed. Give commands need cheats enabled (or operator permission on a server). On Bedrock the basic /give player item amount works the same, but Bedrock does not use this Java-style component syntax for enchantments — this generator targets Java Edition.

Targets, inventory space and large counts

Selector choice changes who executes the result, not the item data. @smeans the command’s current executor, which is convenient in functions and command blocks;@p selects the nearest player; @a applies the command separately to every player. A named-player target is limited here to the normal Java username shape so that spaces cannot accidentally split the command into extra arguments.

The count is an item quantity, not a stack count. Vanilla limits one give operation to 100 stacks’ worth, so 6,400 is the upper bound for an item that stacks to 64 and the effective delivered amount is lower for items with smaller stack sizes. When the inventory cannot hold everything, vanilla may place excess items at the recipient rather than fitting them into occupied slots. Use a small test count before targeting every player on a live server.

Frequently asked questions

Why does my old /give command not work any more?

Almost always because it uses pre-1.20.5 NBT ({Enchantments:[...]}, {display:{Name:...}}). Modern Minecraft replaced that with bracketed item components. Regenerate the command here and it will use the current 26.2 syntax.

What is the maximum count I can give?

The count argument accepts any number, but a single /give delivers at most 100 stacks of the item at once — 6,400 for a normal 64-stackable item, fewer for items with smaller stacks. This tool caps the field at 6,400; the game splits the total across stacks in the inventory.

Can I give enchanted items the enchanting table would never allow?

Yes. The /give command ignores the table’s rules, so you can stack mutually exclusive or off-item enchantments — for instance Sharpness on a pickaxe. The enchantment list in this generator is therefore unrestricted.

Planning the enchantments first? Use the enchantment calculator to find the cheapest anvil order, or read how enchanting works for the mechanics behind the numbers.