Updated 25 October 2026. Facts on this page come from minecraft.wiki, minecraft.net and the live Artemis PvP server; sources are listed at the bottom.

The /item Command in Minecraft (and /replaceitem)
/item puts, copies or changes items in any slot of a player, mob or container on Java Edition. For example /item replace entity @p hotbar.8 with minecraft:spruce_sapling 4 puts four saplings in the nearest player's last hotbar slot. Bedrock does the same job with /replaceitem. Both need cheats.
What can /item do?
| Mode | What it does |
|---|---|
| replace ... with | Puts an item in one slot |
| replace ... from | Copies an item from another slot, player or container |
| modify ... | Changes the item in a slot with a data pack item modifier |
| override and fill | Work on several slots at once |
Targets are block
What are some /item examples?
/item replace block ~ ~2 ~ container.26 with minecraft:spruce_sapling 4: fills the last slot of a chest two blocks up./item replace entity @s weapon.offhand from entity @s weapon.mainhand: copies your main-hand item into your off-hand./item replace entity @s armor.head with minecraft:brown_banner: puts a banner on your head.- Slot names include hotbar.0-8, inventory.0-26, container.0-53, armor.head, armor.chest, armor.legs, armor.feet, weapon.mainhand and weapon.offhand.
How is /item different from /give?
/give adds items wherever there is room, while /item chooses the exact slot and can replace what is there, even for mobs and chests; see /give. To remove items use /clear. Wearing a block as a hat, as in the banner example, is a classic /item trick; see banners.
What is the Bedrock version?
Bedrock uses /replaceitem, for example /replaceitem entity @s slot.weapon.offhand 0 totem_of_undying. Its block form uses slot.container with a slot number. Other Bedrock differences: Bedrock commands.
Who can use it?
Operators with permission level 2 for /item on Java, or level 1 with cheats on for /replaceitem on Bedrock, plus command blocks and data packs. It is a favorite of map makers for kits and loadouts; see command blocks.
Frequently asked questions
What is /replaceitem in Java?
It was replaced by /item; Bedrock still uses /replaceitem.
Sources
Every fact on this page was checked against these pages; the wording is ours.