Stop searching for commands! Our ultimate guide provides every updated Minecraft code for Java and Bedrock, covering everything from simple /give and /tp to complex /execute sequences. Master every cheat and game-changing rule to customize your world instantly.
Minecraft Console Commands
Minecraft primarily uses console commands (often called “codes” or “cheats” by players) to change the game, world, or player status.
Active Console Commands (Codes) for Minecraft
Here are essential Minecraft commands, in list format:
/give <player> <item> [amount]- Adds a specified quantity of an item to a player’s inventory.
- Example:
/give @p diamond 64
/teleport <target> <x> <y> <z>- Instantly moves a player or entity to a specific coordinate in the world.
- Example:
/teleport @p 100 65 200
/gamerule <rule> <value>- Allows you to change specific settings of the game world, such as keeping inventory on death or disabling mob griefing.
- Example:
/gamerule keepInventory true
/time set <value>- Changes the time of day in the world. You can use values like
day,night,noon, or a specific number (e.g.,1000for morning). - Example:
/time set day
- Changes the time of day in the world. You can use values like
/weather <type> [duration]- Changes the current weather. Types include
clear,rain, andthunder. - Example:
/weather thunder 1000
- Changes the current weather. Types include
/difficulty <level>- Sets the game’s difficulty level. Levels are
peaceful,easy,normal, andhard. - Example:
/difficulty peaceful
- Sets the game’s difficulty level. Levels are
/effect give <target> <effect> [seconds] [amplifier]- Applies a status effect (like Speed or Regeneration) to a player or entity.
- Example:
/effect give @p speed 60 5
/kill <target>- Kills a player, a mob, or other entities.
- Example:
/kill @e[type=zombie]
/fill <x1> <y1> <z1> <x2> <y2> <z2> <block>- Fills a specified cubic area between two coordinates with a single type of block.
- Example:
/fill 0 60 0 10 70 10 stone
/locate structure <structure_type>- Shows the coordinates of the nearest specified generated structure.
- Example:
/locate structure village
Target Selectors
These shortcuts specify who or what a command should affect:
@s: You (the entity executing the command).@p: The nearest player.@a: All players.@r: A random player.@e: All entities (mobs, items, players, etc.).
For example, /give @s diamond_sword 1 gives you a diamond sword.
How to Enter Console Commands in Minecraft (Basic Guide)

Time needed: 4 minutes
How to redeem codes in Minecraft:
- Find Your Code: Locate the 25-character code.
- Go to the Redemption Page; https://www.minecraft.net/en-us/redeem/
- Sign In: You must sign in with the Microsoft Account.
- Enter the Code.
- Confirm and Enjoy!
How to Enter Console Commands in Minecraft (Extended Guide)
Entering console commands in Minecraft is straightforward, but it first requires you to have cheats enabled in your world.
🔑 Step 1: Enable Cheats
Before you can use commands, you must enable “cheats” for your world:
- For a New World (Java & Bedrock): On the Create New World screen, make sure the Allow Cheats or Activate Cheats option is toggled On.
- For an Existing World (Java Edition): Open the pause menu (Esc), select Open to LAN, then toggle Allow Cheats to On, and click Start LAN World. Note: This only lasts for the current play session.
- For an Existing World (Bedrock Edition): You can change this in the world settings menu, but enabling cheats will permanently disable achievements for that world.
đź’¬ Step 2: Open the Command/Chat Interface
Press the key or button that opens the chat window for your platform:
- PC (Java & Bedrock): Press the forward slash key (
/) or theTkey. Using/is generally faster because it automatically prefixes your command. - Console (Xbox, PlayStation, Switch): Press the Right Directional Pad (D-pad) button.
✍️ Step 3: Enter and Execute the Command
- Type the Command: All commands must start with a forward slash (
/). - Use Tab (PC only): As you type, the game will suggest commands and arguments; press Tab to autocomplete the highlighted text.
- Execute: Press Enter on PC/Keyboard or the equivalent button on your console (often a button like ‘A’ or ‘X’ after typing).
Top 5 Gameplay Strategies for Minecraft

The best strategies in Minecraft:
- Prioritize Stone Tools and Shelter: Your first few minutes should be spent gathering wood, then immediately using it to craft a crafting table and a wooden pickaxe. Quickly mine enough stone to upgrade your essential tools—pickaxe, axe, and sword—and dig a small hole in a hillside to survive the first night.
- Acquire a Bed Immediately: Finding and killing three sheep (of the same color) for wool should be a top priority during the first day. Crafting and sleeping in a bed allows you to skip the dangerous night and sets a crucial new spawn point.
- Light Up and Mob-Proof: Hostile mobs only spawn in dark areas with a light level of 7 or less, both above and underground. Craft and place torches liberally inside your home, mine, and surrounding perimeter to prevent monsters from spawning and keep you safe.
- Establish a Renewable Food Source: Constantly hunting for food is time-consuming and inefficient, so focus on setting up a farm early on. Plant seeds, potatoes, or carrots, or create a small fenced-in pen to breed cows and pigs for a steady supply of cooked meat.
- Branch Mine for Strategic Resources: Once you have iron armor and tools, establish a long, straight mining tunnel deep underground, typically at diamond-level (Y-level -58 or below). Digging long parallel “branches” off the main tunnel is the most efficient way to find diamonds and other valuable ores.
More About Minecraft
Minecraft revolutionized open-world gaming, blending elements of a sandbox, survival game, action-adventure, RPG (Role-Playing Game), and simulation into a single blocky experience. Players explore vast, procedurally generated landscapes, gather materials, and then craft essential tools and formidable structures. Hostile mobs, especially when night falls, force players to prioritize immediate survival, giving a sense of urgency to the exploration and building loop.
Ultimately, the game’s famous Creative Mode and deep modding community encourage limitless architectural projects and custom game experiences. Consequently, this enduring blend of freedom, challenge, and creativity drives its incredible popularity, motivating millions to continuously explore new updates and share their ambitious worlds online.
Code Index | Home | Guides | Franchise Games | Roblox Games
