In Minecraft, a cheat and a command are the same thing. You open chat, type a line that starts with a slash, and it runs on the spot, whether that's /gamemode creative or a /give that hands you any item in the game.

Bedrock Edition adds a catch worth reading before you start. Switching cheats on marks that world as achievement-blocked for good, so we'd keep a scratch world for the fun and leave the save you care about clean.

The commands themselves run almost identically on Java Edition, Bedrock Edition, and the current Xbox, PlayStation, and Switch versions, which all sit on Bedrock underneath. Those Bedrock versions also play together across consoles, and our Minecraft crossplay guide explains how. Nothing fires until a world has cheats or commands turned on, and that switch works differently per platform, so it gets its own section below the list.

Every command, grouped by what it does

A quick key for the tables: <value> is something you fill in, [<value>] is optional, and a bar between options means you pick one. These are the commands players look up most, and minecraft.wiki keeps the complete, version-by-version reference.

Game mode

Command Effect
/gamemode <survival|creative|adventure|spectator> [<target>] Switch a player between Survival, Creative, Adventure, and Spectator; leave the target off to change yourself
/gamemode creative The exact one-liner most people want, flipping you straight into Creative

Items, enchanting, and inventory

Command Effect
/give <target> <item> [<count>] Drop any item stack into an inventory; Java allows up to 2,147,483,647, Bedrock caps the amount at 32,767
/enchant <target> <enchantment> [<level>] Enchant the held item up to the level it allows, and it still refuses mismatches an anvil would, like Sharpness on a bow
/clear [<target>] [<item>] [<maxCount>] Empty an inventory, or strip one item up to a count, and report how many it removed

Movement

Command Effect
/teleport <target> <destination|x y z> [<rotation>|facing <entity|x y z>] Move a target to another entity or exact coordinates, optionally setting which way it faces; short form is /tp

Experience

Command Effect
/experience add <target> <amount> [levels|points] Grant, or with a negative number remove, XP levels or raw points; short form is /xp
/experience set <target> <amount> [levels|points] Set XP to an exact level or point total instead of adding to it

Status effects

Command Effect
/effect give <target> <effect> [<seconds>] [<amplifier>] [<hideParticles>] Apply a potion-style effect with no potion; amplifier 0 is level I, and Java needs the minecraft: prefix on the effect id
/effect clear [<target>] [<effect>] Remove one named effect or every active one (Bedrock writes it as /effect <target> clear)
/effect give <target> resistance <seconds> 5 true The nearest thing to god mode, since Resistance at amplifier 5 blocks almost all incoming damage

World rules

Command Effect
/gamerule keepInventory true Keep items and XP through death; off by default
/gamerule doDaylightCycle false Freeze the time of day and the moon phase
/gamerule doMobSpawning false Stop mobs appearing on their own; summoned mobs still spawn
/gamerule mobGriefing false Stop creepers, endermen, and similar mobs changing blocks

Time, weather, and difficulty

Command Effect
/time set <day|noon|night|midnight|<ticks>> Jump the clock to a preset or an exact tick (day 1,000, noon 6,000, night 13,000, midnight 18,000)
/time add <ticks> Add ticks to the current time; 24,000 is one full day
/weather <clear|rain|thunder> [<duration>] Force clear skies, rain, or a thunderstorm, optionally for a set time
/difficulty <peaceful|easy|normal|hard> Set Peaceful, Easy, Normal, or Hard; run it bare on Java to read the current setting

Spawning and building

Command Effect
/summon <entity> [<pos>] [<nbt>] Spawn any mob, projectile, or object; Java needs the minecraft: prefix on the id
/fill <from-pos> <to-pos> <block> [destroy|hollow|keep|outline|replace] Replace every block in a box between two points; Java caps the region at 32,768 blocks
/setblock <pos> <block> [destroy|keep|replace] Place a single block at exact coordinates, quicker than /fill for one edit
/particle <name> [<pos>] [<delta>] [<speed>] [<count>] Emit a cosmetic particle effect at a spot

Killing, spawn points, and the border

Command Effect
/kill [<target>] Instantly kill a target, or yourself if you leave it blank
/spawnpoint [<target>] [<pos>] Set where one player respawns, ignoring beds
/setworldspawn [<pos>] [<angle>] Move the default spawn for the whole world
/worldborder <set|add|center|damage|warning> <value...> Resize, re-center, or configure the invisible boundary

Finding structures, biomes, and the seed

Command Effect
/locate structure <structure> Report the coordinates of the nearest village, stronghold, mansion, and so on
/locate biome <biome> Report the nearest instance of a named biome
/seed Print the current world's seed

Servers and admin

Command Effect
/list Show the player count and who is online
/whitelist <add|remove|list|on|off|reload> [<player>] Manage a server's whitelist; needs operator permission
/op <player> Promote a player to operator (undo with /deop)

Messages, display, and sound

Command Effect
/say <message> Broadcast a message to everyone as the server
/title <target> <title|subtitle|actionbar> <text> Show big text, a subtitle, or an action-bar line on screen
/playsound <sound> <source> <target> [<pos>] [<volume>] [<pitch>] [<minVolume>] Play any registered sound at a location
/stopsound <target> [<source>] [<sound>] Cut off sounds that are playing for a target
/tag <target> <add|remove|list> [<name>] Attach a hidden tag to an entity for later target selectors

Progression (Java Edition only)

Command Effect
/advancement <grant|revoke> <target> <everything|only|from|through|until> [<advancement>] [<criterion>] Manually unlock or remove a Java advancement; Bedrock has no equivalent command

The commands with a choice of options, in full

A bar means you pick exactly one value. Markdown tables have to escape those bars, so here are the same commands written out plainly, in case you want to copy the syntax straight:

/gamemode <survival|creative|adventure|spectator> [<target>]
/teleport <target> <destination|x y z> [<rotation>|facing <entity|x y z>]
/experience add <target> <amount> [levels|points]
/experience set <target> <amount> [levels|points]
/weather <clear|rain|thunder> [<duration>]
/time set <day|noon|night|midnight|<ticks>>
/difficulty <peaceful|easy|normal|hard>
/fill <from-pos> <to-pos> <block> [destroy|hollow|keep|outline|replace]
/setblock <pos> <block> [destroy|keep|replace]
/whitelist <add|remove|list|on|off|reload> [<player>]
/title <target> <title|subtitle|actionbar> <text>
/tag <target> <add|remove|list> [<name>]
/advancement <grant|revoke> <target> <everything|only|from|through|until> [<advancement>] [<criterion>]
/worldborder <set|add|center|damage|warning> <value...>

How to turn cheats on, and how to enter commands

On Java, switch cheats on while you create the world: open the Game options and flip the cheats toggle. Current versions label that button Allow Commands; older ones called the same setting Allow Cheats.

Java gives you no menu switch to add cheats to a world that already exists. The way in is to pause, choose Open to LAN, set Allow Cheats to On, and click Start LAN World, which turns commands on for that session.

That LAN setting is only temporary in some client versions and can reset when you close and reopen the world, so confirm it's still on before you rely on it.

On Bedrock, pause, open Settings, go to the Game tab, scroll to the Cheats section, and switch Activate Cheats on. This works both at world creation and on an existing world from the same screen, which is the part Java can't match.

On a Java multiplayer server, an existing operator or the server console runs /op <player> to give that player command access whatever the world's original setting was. Bedrock dedicated servers use their own permissions file rather than the client cheats toggle.

Once a world allows them, you enter every command the same way: press the chat or command key, type the line starting with a slash, and press enter.

What switching cheats on turns off

This is where Bedrock and Java split hard. Achievements exist only on Bedrock (gamerscore on Xbox, Windows, and mobile; trophies on PlayStation), and turning Activate Cheats on disables them permanently for that world, even if you switch cheats off a second later. Minecraft still ranks among the best PS5 multiplayer games when you play it straight.

The block is written into the world save, so ordinary play never clears it. Minecraft.wiki and server guides such as Aternos and Shockbyte all describe the same behavior.

Cheats are not the only trigger. The same permanent block comes from switching to Creative mode, generating a flat world, adding behavior packs, turning on experimental features, using a non-custom Marketplace template, or opening a world in the Editor.

The only documented way to undo a block that already fired is a third-party world-editing tool that hand-edits the save's stored flags, which sits outside normal play and isn't an official feature. We'd rather run one clean survival save and a separate cheat world than lean on that.

Java Edition has no achievements at all. It tracks advancements instead, and neither turning commands on nor running them locks those, which is why /advancement can grant or revoke them directly.

One note for old hardware: the discontinued Xbox 360 and PS3 era releases ran their own rules, but every current console version runs Bedrock and follows the block above. On current Xbox, Minecraft is one of our best multiplayer games on Xbox picks.

The gamerule rename in the December 2025 update

If a gamerule that used to work suddenly does nothing, the 1.21.11 update from December 2025 is the reason. Mojang moved gamerules into a registry and gave them new snake_case ids.

Older name (still common) Canonical id on 1.21.11 and up
keepInventory keep_inventory
doDaylightCycle advance_time
doMobSpawning spawn_mobs
mobGriefing mob_griefing

Both forms are still documented, and most current guides and servers use the camelCase names, so those are what the tables above use. On 1.21.11 and newer, switch to the snake_case id, or the full minecraft:keep_inventory form, if the old name stops responding.

Start here, and keep one world clean

Play games and earn real cash with HeyCash

If you just want to mess around, make a fresh world, allow cheats, and open with /gamemode creative plus a /give for whatever you feel like building with. Keep any world you want achievements on well away from the cheats toggle, since Bedrock never hands that back. On phones, Minecraft leads our best multiplayer mobile games roundup. Terraria scratches the same sandbox itch, and our Terraria crossplay guide covers who you can build with.

Only on Bedrock, and yes. Once Activate Cheats is on in a world, that world can never earn achievements again, even if you turn cheats back off, and Java has no achievements to lose in the first place.
No, there's no /god command in vanilla Minecraft. Players fake it with /effect give <target> resistance <seconds> 5 true, which blocks essentially all damage at Resistance level 5 or higher.
There's no settings switch for a world that already exists. Open the pause menu, choose Open to LAN, and set Allow Cheats to On there, which enables commands for that play session.
The 1.21.11 update renamed gamerules, so keepInventory's canonical id is now keep_inventory (or minecraft:keep_inventory). Servers on 1.21.11 and up may need the new name, while older versions still take the camelCase form.

Turn spare gaming time into rewards

If you want your mobile game time to add up to something, HeyCash pays you points for playing game offers, taking surveys, and finishing offer walls, and those points convert to PayPal cash. Free to use, and some reward options start at $1.

Share this with your friends