Skip to content
LAUNCH DAY GEAR

Minecraft Commands and Cheats

Minecraft has no old-style cheat codes; instead it uses native slash commands typed into the chat box (or run from command blocks). Commands only work when "Allow Cheats" (Java) / "Activate/Allow Cheats" (Bedrock) is enabled for the world, or when you are a server operator. Once cheats are on, the command syntax is essentially identical across every platform, so most codes are listed as platform "All"; the few differences are between the Java and Bedrock editions rather than between hardware platforms.

Cheats
38
Platforms
PC + all platforms
Type
Console commands
Last reviewed
November 1, 2026

Before you use cheats: Achievements/Trophies: In BEDROCK Edition, enabling cheats PERMANENTLY disables achievements for that world on every platform (Windows, mobile, PlayStation, Xbox, Switch). A common workaround is to leave cheats off at world creation and instead enable them temporarily for a single session via 'Open to LAN' > Allow Cheats: ON (achievements stay enabled until you reload). In JAVA Edition, enabling cheats / running commands does NOT disable advancements. No legality or online-ban risk: these are built-in features, not third-party hacks. Commands like /kill, /fill, and /clone are powerful and can destroy builds or items instantly with no undo, so test on a backup world first. Internal gamerule names changed to snake_case in recent Java versions, but the classic camelCase names (e.g. keepInventory) are still accepted; Bedrock treats gamerule names as case-insensitive (e.g. keepinventory).

How to enter cheats

PC

Java: When creating a new world, open 'More World Options...' / 'Game Rules' and turn on 'Allow Cheats: ON' (cheats can also be force-enabled mid-game per session via 'Open to LAN' > Allow Cheats: ON). Bedrock (Windows): when creating/editing a world, open Settings > Cheats and turn on 'Activate Cheats'. To enter commands, press T or / to open the chat box, type the command starting with /, then press Enter. Command blocks can be obtained with /give @s command_block and run commands when powered by redstone.

PlayStation

Bedrock only on console. New world: in Create New World > Settings > Cheats, toggle 'Activate Cheats' ON. Existing world: pause > Settings > Cheats > Activate Cheats. To type a command, open chat with the on-screen chat button (the speech-bubble icon at top of screen), type the command beginning with /, and submit. Command blocks (/give @s command_block) also work.

Xbox

Bedrock only on console. New world: Create New World > Settings > Cheats > Activate Cheats ON. Existing world: pause > Settings > Cheats. Open the chat/command line with the chat button at the top of the screen, type the command starting with /, and confirm. Command blocks are available via /give @s command_block.

Switch

Bedrock only. New world: Create New World > Settings > Cheats > Activate Cheats ON. Existing world: pause > Settings > Cheats. Tap/select the chat button at the top of the screen to open the command line, type the command starting with /, and submit. Command blocks work the same as other editions.

Mobile

Bedrock (iOS/Android). New world: Create New World > Settings > Cheats > Activate Cheats ON. Existing world: pause menu > Settings > Cheats. Tap the chat bubble at the top of the screen to open the chat box, type the command starting with /, and tap the arrow/Enter to run it.

All Minecraft commands

38 cheats

Game Mode & Difficulty (5)

  • Switch to Creative mode (fly, unlimited blocks, no damage)

    Modes: survival, creative, adventure, spectator. Java (1.13+) accepts full names only, e.g. /gamemode creative. Bedrock also accepts single letters and numbers, e.g. /gamemode c or /gamemode 1 (survival s/0, creative c/1, adventure a/2, default d). Add a target at the end, e.g. /gamemode creative @a.

    All platforms
    /gamemode creative
  • Switch to Survival mode

    All platforms
    /gamemode survival
  • Switch to Adventure mode

    All platforms
    /gamemode adventure
  • Switch to Spectator mode (Java; Bedrock has it too in recent versions)

    All platforms
    /gamemode spectator
  • Set world difficulty

    Values: peaceful, easy, normal, hard. Peaceful stops hostile mob spawns and slowly heals you.

    All platforms
    /difficulty peaceful

Items & Inventory (5)

  • Give yourself an item

    Java syntax: /give <targets> <item> [count] [dataTag]. Bedrock: /give <player> <itemName> [amount] [data] [components]. Item names use the minecraft: namespace (the prefix is optional when typing). Example: /give @s diamond_sword 1. Use @s for yourself, @p nearest player, @a all players.

    All platforms
    /give @s <item> [amount]
  • Give a stack of diamonds

    All platforms
    /give @s diamond 64
  • Give a command block (to run commands via redstone)

    Requires cheats/op. Placing and editing command blocks lets you run any command automatically.

    All platforms
    /give @s command_block
  • Add experience points or levels

    Java: /xp add <targets> <amount> [points|levels] or /xp set ... ; /experience is an alias. To add levels on Java use /xp add @s <amount> levels. Bedrock adds points with /xp <amount> @s and levels with an L suffix, e.g. /xp 30L @s; the word 'levels' only works on Java.

    PC
    /xp add @s 1000 points
    All platforms
    /xp <amount> @s
  • Enchant the held item / a target's item

    Example: /enchant @s sharpness 5. The target must be holding a compatible item. Java enforces each enchantment's normal maximum level (other commands such as /give can bypass it); works on the item in the main hand. Bedrock also accepts a numeric enchantment ID instead of the name.

    All platforms
    /enchant @s <enchantment> [level]

Teleportation & World Navigation (4)

  • Teleport yourself to coordinates

    /teleport is the full form, /tp is the alias. Use ~ for relative coordinates (e.g. /tp @s ~ ~10 ~ to rise 10 blocks). You can also teleport to a player: /tp @s <playername>.

    All platforms
    /tp @s <x> <y> <z>
  • Teleport one player/entity to another

    Example: /tp Steve Alex teleports Steve to Alex.

    All platforms
    /tp <target> <destinationPlayer>
  • Locate the nearest structure

    Java (1.19+): /locate structure|biome|poi <id>, e.g. /locate structure minecraft:village. Bedrock uses the same subcommand form: /locate structure <structure> (e.g. /locate structure village) and /locate biome <biome>; a bare /locate <structure> no longer works. Bedrock biome IDs need the minecraft: namespace, e.g. /locate biome minecraft:plains. Returns coordinates to the nearest match.

    All platforms
    /locate structure <structure>
  • Display the world seed

    Prints the numeric seed of the current world to chat.

    All platforms
    /seed

Time & Weather (4)

  • Set time to day

    Accepts: day, noon, night, midnight, sunrise, sunset, or a tick number (0-24000). /time add <ticks> advances time; /time query gives the current value.

    All platforms
    /time set day
  • Set time to night

    All platforms
    /time set night
  • Clear the weather

    Options: clear, rain, thunder. The optional duration is in ticks (20 ticks = 1 second), e.g. /weather clear 1000000 is about 14 hours. On Java 1.19.4+ you can add a unit suffix, e.g. /weather clear 10000s for 10000 seconds.

    All platforms
    /weather clear
  • Start rain / thunderstorm

    All platforms
    /weather thunder

Status Effects (Potion Effects) (3)

  • Give a status effect (potions without items)

    Java uses /effect give <targets> <effect> ...; Bedrock uses /effect <player> <effect> ... Amplifier is 0-indexed (0 = level I, 1 = level II). Common effects: speed, haste, strength, jump_boost, regeneration, water_breathing, night_vision, invisibility, fire_resistance, resistance, levitation, slow_falling, saturation, glowing.

    PC
    /effect give @s <effect> [seconds] [amplifier] [hideParticles]
    All platforms
    /effect @s <effect> [seconds] [amplifier] [hideParticles]
  • Infinite Night Vision

    Use a huge duration for near-infinite. In recent Java versions you can use the literal 'infinite' as the duration: /effect give @s night_vision infinite.

    PC
    /effect give @s night_vision 999999 0 true
    All platforms
    /effect @s night_vision 999999 0 true
  • Clear all status effects

    Java: /effect clear <targets> [effect]. Bedrock: /effect <player> clear.

    PC
    /effect clear @s
    All platforms
    /effect @s clear

Entities & Mobs (2)

  • Summon an entity (mob, item, etc.)

    Example: /summon zombie ~ ~ ~. Java supports an extra NBT tag argument for custom data; Bedrock supports optional spawnEvent/nameTag arguments. Entity ids use the minecraft: namespace.

    All platforms
    /summon <entity> [x] [y] [z]
  • Kill entities / yourself

    /kill with no target kills the executing player. /kill @e[type=zombie] kills all zombies; /kill @e (Java) can clear all entities including dropped items, so use carefully.

    All platforms
    /kill [target]

Building & World Editing (3)

  • Place a single block at a position

    Example: /setblock ~ ~ ~ stone. Optional mode in Java: replace, destroy, keep.

    All platforms
    /setblock <x> <y> <z> <block>
  • Fill a region with a block

    Fills the cuboid between the two corners. Optional modes: replace, hollow, outline, keep, destroy (Java) / similar on Bedrock. Large fills can lag or overwrite builds with no undo.

    All platforms
    /fill <x1> <y1> <z1> <x2> <y2> <z2> <block>
  • Clone (copy) a region to another location

    Java: /clone <begin> <end> <destination> [maskMode] [cloneMode]. Bedrock similar. Destination is the lowest corner where the copy is pasted.

    All platforms
    /clone <x1> <y1> <z1> <x2> <y2> <z2> <destX> <destY> <destZ>

Game Rules (12)

  • Keep your inventory when you die

    Java uses camelCase keepInventory; Bedrock is case-insensitive (keepinventory). Set false to drop items on death (default).

    PC
    /gamerule keepInventory true
    All platforms
    /gamerule keepinventory true
  • Stop the day/night cycle (freeze time of day)

    When false, time stays fixed at whatever it is when you run it (combine with /time set day).

    PC
    /gamerule doDaylightCycle false
    All platforms
    /gamerule dodaylightcycle false
  • Disable mob griefing (mobs can't destroy/trample blocks)

    Stops creeper terrain damage, enderman block-stealing, farm trampling, etc.

    PC
    /gamerule mobGriefing false
    All platforms
    /gamerule mobgriefing false
  • Stop fire from spreading

    Fire still burns but won't spread to or destroy nearby blocks.

    PC
    /gamerule doFireTick false
    All platforms
    /gamerule dofiretick false
  • Change random tick speed (crop/plant growth rate)

    Integer rule. Default is 3 in Java, 1 in Bedrock; max 4096. Higher = faster crop growth, leaf decay, fire burnout. Very high values cause severe lag.

    PC
    /gamerule randomTickSpeed 100
    All platforms
    /gamerule randomtickspeed 100
  • Disable mob spawning

    Stops natural mob spawns (already-spawned mobs remain).

    PC
    /gamerule doMobSpawning false
    All platforms
    /gamerule domobspawning false
  • Stop the weather cycle

    Freezes current weather; pair with /weather clear.

    PC
    /gamerule doWeatherCycle false
    All platforms
    /gamerule doweathercycle false
  • Respawn instantly without the death screen

    Skips the 'You Died' screen and respawns immediately.

    PC
    /gamerule doImmediateRespawn true
    All platforms
    /gamerule doimmediaterespawn true
  • Turn off natural health regeneration

    Players no longer heal from a full hunger bar (must use food/effects/golden apples).

    PC
    /gamerule naturalRegeneration false
    All platforms
    /gamerule naturalregeneration false
  • Show/hide coordinates (Bedrock)

    Bedrock-specific HUD coordinate display. In Java, the F3 debug screen shows coordinates instead.

    All platforms
    /gamerule showcoordinates true
  • Toggle PvP (players damaging each other)

    Note: in Java this rule is primarily a Bedrock/server-style toggle; standard Java servers use server.properties pvp. On Bedrock, /gamerule pvp false disables player-vs-player damage.

    PC
    /gamerule pvp false
    All platforms
    /gamerule pvp false
  • Hide command output / feedback in chat

    commandBlockOutput suppresses command-block messages; sendCommandFeedback (Java) / sendcommandfeedback (Bedrock) suppresses chat feedback from player-run commands.

    PC
    /gamerule commandBlockOutput false
    All platforms
    /gamerule commandblockoutput false

Minecraft does not have a fixed list of cheat codes; it has a large command set plus thousands of item IDs, block IDs, entity IDs, enchantment IDs, effect IDs, and dozens of game rules. This entry captures every major command and its Java vs Bedrock syntax, the most-used variants, and the most-searched game rules, rather than enumerating every ID. For the authoritative, complete reference of all commands, item/block/entity IDs, and game rules, see the official Minecraft Wiki command list at https://minecraft.wiki/w/Commands and the official Bedrock command docs at https://learn.microsoft.com/en-us/minecraft/creator/commands/. For exhaustive copy-paste item/give IDs, DigMinecraft maintains per-version ID lists at https://www.digminecraft.com/lists/item_id_list_pc.php (Java) and https://www.digminecraft.com/lists/item_id_list_pe.php (Bedrock).

FAQ

How do you enable cheats in Minecraft?

When creating a world, turn on the "Allow Cheats" toggle in the world settings. In an existing single-player world you can usually open it to LAN and enable cheats from the pause menu. Once cheats are on, type commands into the chat box starting with a forward slash (/).

Do cheats disable achievements in Minecraft?

Yes. Enabling cheats permanently disables achievements and trophies for that world, even if you later turn cheats back off. If you want achievements, play with cheats disabled or create a separate world for experimenting with commands.

Is there a money cheat in Minecraft?

No. Vanilla Minecraft has no currency system, so there is no money cheat. Players use commands like the give command to grant items directly, and any in-game economy comes from servers, plugins, or add-ons rather than a built-in money cheat.

How do you give yourself items in Minecraft?

Use the give command in the chat console, specifying the player name and the item identifier (and optionally a quantity). Cheats must be enabled first. In Creative mode you can also pull items directly from the creative inventory without any command.

Do Minecraft cheats work on Java and Bedrock?

Both editions support commands, but the syntax and some command names differ. Java Edition and Bedrock Edition (Windows, consoles, and mobile) share many core commands like gamemode, give, and teleport, while certain commands, targets, and arguments are edition-specific.

How do you turn on creative mode with a command?

With cheats enabled, use the gamemode command in chat and set it to creative; you can switch back to survival, adventure, or spectator the same way. Creative mode gives flight, unlimited blocks, and no damage, which is why cheats must be on to change it via command.

Checked against

Found a code that does not work? Tell us through the contact page and we will recheck it.

More cheats

Sims, Minecraft and sandbox games

Browse cheats for every game