Skip to content
Gamepedix

Minecraft cheats and commands: the most useful ones for Java and Bedrock

Minecraft official image
IGDB.com
Verified on November 23, 2026Source: Gamepedix editorial team, cross-checked with several independent cheat lists

Minecraft doesn't have secret codes: its "cheats" are commands that you type in the chat. They work in Java Edition and Bedrock Edition (consoles, mobile and Windows), with small differences in syntax.

How to turn on cheats

Most useful commands

CommandWhat it does
/gamemode creativeSwitch to Creative mode (survival, adventure and spectator also work)
/time set dayMake it day (also night, noon, midnight)
/weather clearStop the rain (also rain, thunder)
/give @s diamond 64Give yourself 64 diamonds (any item ID works)
/tp @s 0 100 0Teleport to coordinates X Y Z
/locate structure village_plainsFind the nearest structure (Bedrock: /locate structure village)
/locate biome cherry_groveFind the nearest biome
/gamerule keepInventory trueKeep your items when you die
/effect give @s night_vision 9999Night vision (any effect works, with a duration in seconds)
/xp add @s 30 levelsAdd 30 experience levels (Bedrock: /xp 30L @s)
/difficulty peacefulChange the difficulty (easy, normal, hard)
/seedShow the world seed (Java)
/kill @e[type=zombie]Remove every zombie in loaded chunks
/summon minecraft:horseSpawn a mob where you stand

@s means "yourself", @p the nearest player and @a every player.

Before you use cheats