What is the /give Command?
The /give command is one of the most useful commands in Minecraft. It allows you to give any item to yourself or other players, making it essential for server admins, map makers, and creative mode players.
/give Command Syntax
The basic syntax for the give command is:
/give <player> <item> [<count>] [<data>] [<components>]
Parameters Explained
- player: The target player. Use
@pfor nearest player,@sfor yourself,@afor all players, or a specific username. - item: The item ID, such as
minecraft:diamond_swordorminecraft:stone. - count: (Optional) Number of items to give, from 1 to 64. Defaults to 1.
- data: (Optional) Data value for legacy versions. Not used in modern Minecraft.
- components: (Optional) Item components like enchantments, custom names, or lore.
Give Command Examples
Basic Examples
Gives 64 diamonds to the nearest player.
Gives 1 iron sword to yourself.
Gives 5 golden apples to the player named Steve.
Advanced Examples
Gives a diamond sword enchanted with Sharpness V (Minecraft 1.20 and earlier).
Gives a diamond sword enchanted with Sharpness V (Minecraft 1.21+ component syntax).
Target Selectors
Target selectors are powerful variables that select players based on conditions:
@p- Nearest player@s- The player executing the command@a- All players@r- Random player@e- All entities (includes mobs, items, etc.)
How to Enable Commands
To use the /give command, you need one of the following:
- Singleplayer: Enable "Allow Cheats" when creating a world, or open to LAN with cheats enabled.
- Multiplayer: Have operator (OP) privileges on the server.
- Creative Mode: Commands are always available in creative mode.
Popular Item IDs for Give Commands
Here are some of the most commonly used item IDs with the give command:
minecraft:diamond- Diamondminecraft:iron_ingot- Iron Ingotminecraft:gold_ingot- Gold Ingotminecraft:netherite_ingot- Netherite Ingotminecraft:emerald- Emeraldminecraft:diamond_sword- Diamond Swordminecraft:diamond_pickaxe- Diamond Pickaxeminecraft:elytra- Elytraminecraft:golden_apple- Golden Appleminecraft:enchanted_golden_apple- Enchanted Golden Apple
Browse our complete item ID list to find any item ID you need.
Tips and Tricks
- Press
Tabwhile typing a command to autocomplete player names and item IDs. - Use the up arrow key to recall previous commands from chat history.
- You can give multiple items at once using command blocks.
- The maximum stack size for most items is 64, but some items like ender pearls stack to 16.
- Use
/clearto remove items:/clear @p minecraft:diamond