Codes, secrets & unlockables
Minecraft cheat codes
A single, organized reference for every cheat and secret currently documented for Minecraft.
Save your game before using cheats. Some codes may disable achievements or trophies for the current session.
Minecraft commands
Before using commands
Commands require cheats or operator permission. Enabling cheats in a Bedrock world disables achievements for that world.
Player and world
- /gamemode creative @s — switch yourself to Creative mode
- /gamemode survival @s — return to Survival mode
- /give @s <item> <amount> — give an item
- /teleport @s <x> <y> <z> — teleport to coordinates
- /time set day — set daytime
- /weather clear — clear the weather
- /summon <entity> — summon an entity
- /locate structure minecraft:stronghold — locate a stronghold
- /setworldspawn — set the world spawn at your position
- /kill @e[type=<entity>] — remove matching entities; use selectors carefully
Server administration
- /op <player> — grant operator status
- /deop <player> — revoke operator status
- /kick <player> <reason>
- /ban <player> <reason>
Command syntax can differ between Java and Bedrock editions. Use tab completion where available.