Minecraft

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.

Verified

Console commands

41

Add 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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

Enabling cheats disables achievements in Bedrock Edition worlds

Back to survival

Returns you to normal play.

Press T and type the command.

PC Reported working
Did this work for you? 1 of 1 reader says it worked

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

Enabling cheats disables achievements in Bedrock Edition worlds

Clear the weather

Stops rain and thunder.

Press T and type the command.

PC Reported working
Did this work for you?

Clone Block Region

Copies a block region to a destination

Type in chat — the world must have cheats enabled (Allow Cheats: On)

All platforms Reported working
Did this work for you?

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.

PC Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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.

PC Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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.

PC Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

Enabling cheats disables achievements in Bedrock Edition worlds

Remove every entity nearby

Kills everything except players.

Press T and type the command.

PC Reported working
Did this work for you?

See in the dark

Grants night vision for the number of seconds given.

Press T and type the command.

PC Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

Enabling cheats disables achievements in Bedrock Edition worlds

Set the time to day

Skips straight to morning.

Press T and type the command.

PC Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

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.

PC Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

Enabling cheats disables achievements in Bedrock Edition worlds

Teleport

Moves you to the coordinates given.

Press T and type the command.

PC Reported working
Did this work for you?

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)

All platforms Reported working
Did this work for you?

Enabling cheats disables achievements in Bedrock Edition worlds

Tips

1

Turn 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.

PC Reported working
Did this work for you?

On Bedrock Edition, turning cheats on disables achievements for that world permanently. Java Edition advancements are not affected.

A code stopped working after a patch? Tell us and we will retest it. Know one we are missing? Submit it here. What the tested badge means, and which codes carry it.

Tools for Minecraft cheats

Quick answers

About Minecraft cheats

How many cheats does Minecraft have?
This page lists 42 for Minecraft: 41 console commands and 1 tip.
How do you enter cheats in Minecraft?
On All: type in chat — the world must have cheats enabled (Allow Cheats: On). On PC: press T and type the command. A few codes use a different method, shown beside each one.
Do cheats disable achievements in Minecraft?
32 of the 42 codes here carry a warning about achievements or trophies. The note reads: "Enabling cheats disables achievements in Bedrock Edition worlds."
Which platforms are these Minecraft cheats for?
The codes on this page are listed for PC (11 codes). Where the game came out on other systems, the codes may differ there.
Are these Minecraft cheats still working?
All 42 are marked "Reported working": each comes from a documented source, and none has been run by us yet. A code we test gets a dated "Tested" badge.