Cheats & codes
Minecraft Cheat Codes
Grouped by type and platform, each one labelled reported working or tested.
There are 42 cheat codes for Minecraft across PC (Microsoft Windows). Each code below lists the exact button combination or console command, what it does, and whether using it disables achievements.
Console commands
41Add Experience
Adds experience points or full levels; /experience is the long-form alias in Java; Bedrock uses /xp with points only on some versions
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Advance Time
Advances world time by the given ticks
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Apply Status Effect
Applies a status effect (e.g., night_vision); Java uses /effect give, Bedrock legacy syntax order differs on some versions
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Back to survival
Returns you to normal play.
Press T and type the command.
Broadcast Chat Message
Broadcasts a plain chat message to all players (server use)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Clear Inventory
Clears inventory, or only the named item/amount
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Clear Status Effects
Removes status effects from the target
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Clear the weather
Stops rain and thunder.
Press T and type the command.
Clone Block Region
Copies a block region to a destination
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Creative mode
Unlimited blocks, flight, and no damage.
Press T to open the chat, type the command and press Enter.
Default Game Mode
Sets the mode new players start in for the world (Java mainly; also listed in Bedrock command lists)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Disable Fall Damage (Java)
Removes fall damage (true restores it); Bedrock uses gamerule falldamage on newer versions — check /gamerule list in-game
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Disable Mob Griefing
Stops creepers/ghast fireballs/endermen from destroying or moving blocks (rule name spelling can vary by edition/version)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Enchant Held Item
Enchants the item the target is holding if compatible
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Fill Region with Block
Fills the box between two corners with a block; modes include replace, hollow, outline, keep, destroy; Java block volume limits apply
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Freeze Day/Night Cycle (Java)
Freezes the day/night cycle so time stops advancing; Bedrock equivalent is /alwaysday or /daylock true
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Game Mode: Creative
Puts the target player in Creative mode with flight (double-jump) and no damage
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Game Mode: Survival
Puts the target player in Survival mode (creative, adventure, and spectator are the other values)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Give Item
Gives the target the named item (e.g., /give @s minecraft:diamond 10). Bedrock syntax uses itemName/data/components fields vs Java NBT
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Give yourself an item
Puts the named item in your inventory. Change diamond and 64 to any item and amount.
Press T and type the command.
Keep Inventory After Death
Keeps your inventory after death instead of dropping it (false restores default)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Keep your items when you die
You no longer drop your inventory on death.
Press T and type the command.
Kill Target
Kills the target player/entity; with no target in Java it kills the executor — be specific with @e[type=...]
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Locate Nearest Biome
Prints coordinates of the nearest matching biome (version-dependent)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Locate Nearest Structure
Prints coordinates of the nearest matching structure (e.g., village); Bedrock also supports /locate biome
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Lock Daylight (Bedrock)
Locks daylight so night never falls (sets doDaylightCycle off); /daylock true is the alias; Java equivalent is /gamerule doDaylightCycle false
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Remove every entity nearby
Kills everything except players.
Press T and type the command.
See in the dark
Grants night vision for the number of seconds given.
Press T and type the command.
This is the 1.13-and-later syntax. Older versions use /effect @s 16 9999 instead.
Set Difficulty: Peaceful
Sets world difficulty (peaceful, easy, normal, hard)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Set Player Spawn Point
Sets an individual player's respawn point
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Set Single Block
Replaces the single block at those coordinates
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Set the time to day
Skips straight to morning.
Press T and type the command.
Set Time of Day
Sets the world clock (0 = sunrise, 13000 = sunset; range 0-24000)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Set Weather
Sets current weather, optionally for a duration; Bedrock also has /toggledownfall to toggle precipitation
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Set World Spawn
Sets the world spawn for all new/respawning players without a personal spawnpoint
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Show Command Help
Lists available commands or shows usage for one command
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Show World Seed
Displays the world seed in chat (click to copy in Java); Bedrock shows seed in world settings too
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Stop hostile mobs spawning
No new mobs appear. Ones already in the world stay.
Press T and type the command.
Summon Entity
Spawns the named mob/entity at your location or given coordinates (e.g., minecraft:enderman)
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Teleport
Moves you to the coordinates given.
Press T and type the command.
Teleport to Coordinates
Teleports a player/entity to coordinates; /teleport is the long form. Java and Bedrock syntax differs slightly; Bedrock adds optional checkForBlocks
Type in chat — the world must have cheats enabled (Allow Cheats: On)
Enabling cheats disables achievements in Bedrock Edition worlds
Tips
1Turn cheats on
Every command below is refused unless the world has cheats enabled.
On the world-creation screen open More World Options and set Allow Cheats to ON. On a world made without cheats, open the pause menu and choose Open to LAN, then set Allow Cheats to ON. That lasts for the session only.
On Bedrock Edition, turning cheats on disables achievements for that world permanently. Java Edition advancements are not affected.
Tools for Minecraft cheats
-
Why is my Minecraft cheat not working?
Answer a few questions and get the specific reason, from our guides.
-
Search Minecraft codes by effect
Type "money" or "god mode" and find the code, typos forgiven.
-
Build a console command for Minecraft
Change the amount, item or location and copy a checked line.
-
Test your controller and button sequences
See every button respond, and check a sequence press by press.
Quick answers