To give yourself items in Minecraft, enable cheats on the world and use the /give command: open chat with the T key and type /give @s minecraft:diamond 64, then press Enter.

This works in Java Edition and in Bedrock Edition worlds where cheats are turned on. It fits single-player building, testing redstone, or replacing items lost to a bug. It does not work on a server unless you are an operator, and it cannot be used in a world created without cheats unless you open that world to LAN with cheats allowed.

Before you type /give: cheats, operators, and world settings

Cheats are the switch that decides whether commands run at all. In a single-player Java world, cheats are chosen when you create the world and can be changed later only through the Open to LAN menu, which allows cheats for that session. In Bedrock, the world settings include an Activate Cheats toggle that can be flipped on an existing world from the pause menu's settings screen. Menu labels differ slightly between editions and versions, so look for the word cheats rather than an exact position.

On a multiplayer server, /give requires operator permission. If you are not an operator, the command returns an error and nothing appears in your inventory. Ask whoever runs the server to grant you operator status, or use Creative mode if the server allows it.

A short checklist before your first command:

  • Confirm cheats are on, or that you are an operator.
  • Know the exact item ID you want; a typo produces an error, not a guess.
  • Have at least one free inventory slot, or the item drops at your feet.
  • Decide the amount: the maximum in one stack is 64 for most items, 16 for items like eggs and ender pearls, and 1 for tools and armor.

The /give command, step by step

  1. Press T to open the chat window (press / first in some versions, which opens chat already in command mode).
  2. Type /give @s minecraft: followed by the item ID, for example /give @s minecraft:oak_planks.
  3. Add a space and a number for the quantity, such as 32. Leaving the number off gives you 1.
  4. Press Enter. The item appears in your inventory, or drops in front of you if your inventory is full.

The @s target means "the player running the command." To give items to someone else, replace @s with their username, as in /give Alex minecraft:bread 16. On Bedrock, the target selector may need to be a player name rather than @s depending on the version.

A full set of building materials

Suppose you are laying a 20 by 20 block floor, which is 400 blocks, and you want stone bricks plus a stack of torches. Type /give @s minecraft:stone_bricks 400, then /give @s minecraft:torch 64. The 400 exceeds one stack, so the game fills six stacks of 64 (384 blocks) and puts the remaining 16 in a seventh slot. Check your inventory after each command: if a slot is occupied by a full stack, the overflow drops on the ground and can despawn after about 5 minutes, so pick it up promptly.

For enchanted gear, the command takes extra data. /give @s minecraft:diamond_sword 1 gives a plain sword; adding enchantment data requires the full component syntax, which differs between editions and is easy to get wrong. The simpler route for enchanted items is Creative mode's inventory search, where you can pick a pre-enchanted version directly.

Finding the right item ID for /give

Item IDs are lowercase and use underscores: minecraft:iron_ingot, minecraft:redstone, minecraft:cooked_beef. Guessing wrong returns "Unknown item" and no item is created. The reliable way to find an ID is to hold the item and press F3+H in Java Edition to toggle advanced tooltips, which then show the ID when you hover over the item. In Bedrock, the Creative inventory search shows item names, and typing a partial name into chat after /give often autocompletes the correct ID.

Blocks and items share the same namespace, so minecraft:stone works for the block and minecraft:stone_sword for the tool. Watch for near-miss names: minecraft:carrot is the food, minecraft:golden_carrot is the brewed version, and minecraft:carved_pumpkin differs from minecraft:pumpkin.

Giving items without commands: Creative mode and the inventory

If commands feel fiddly, switch the world to Creative mode. In Java, type /gamemode creative; in Bedrock, use the settings menu or the same command if cheats are on. Creative mode opens the full item inventory, organized into tabs for building blocks, decoration, redstone, tools, combat, food, and ingredients. Click an item to place a full stack in your hotbar, or middle-click (Java) to copy a block you are looking at. This is the fastest route for enchanted books, potions, and spawn eggs, which are awkward to write as commands.

Creative mode also removes the need to manage stack sizes: you can pull 64 of nearly anything repeatedly, and items you drop do not despawn. Switch back with /gamemode survival when you want normal play.

What goes wrong with /give and how to fix it

"Cheats are not enabled on this server" means the world was created without cheats. Open the world to LAN with cheats allowed for that session, or recreate the world with cheats on. Progress in the old world does not transfer automatically.

"Unknown item" means the ID is misspelled or does not exist in your edition. Some items exist only in Java or only in Bedrock; check the exact spelling against the item in your inventory.

Items vanish after a moment means they dropped on the ground because your inventory was full. Clear a slot and run the command again; dropped items despawn after roughly 5 minutes.

Nothing happens at all usually means you typed the command without the leading slash, so chat sent it as a message. Start every command with /.

Keeping a world fair after using /give

Cheats stay on once enabled, and using /give does not disable achievements in Java but does in Bedrock worlds flagged as cheated. If you want achievements, keep a separate world for testing. For a survival world where you only need a small correction, give exactly what was lost rather than a full stack, and note the amount somewhere so you do not over-supply. Turning cheats off again is not possible in Java without external tools, so treat the decision as permanent for that world file.