How To

How to Use Minecraft Commands: Complete Cheats List (Java & Bedrock)

Master essential Minecraft console commands and cheat syntax. Explore target selectors, gamerule options, item components, teleportation, and command blocks.

Press / to open chat with a command prefix, or T to open normal chat on a keyboard. On Bedrock touch controls, use the chat button.

Executing console commands allows you to modify time and weather, teleport instantly across infinite coordinates, grant unlimited experience levels, summon custom mobs, and receive high-tier enchanted gear. World-changing commands require sufficient permission. Commands such as /help can be available without enabling cheats.

How to use Minecraft commands tutorial cover showing in-game chat command input and autocomplete suggestions

Enabling cheats in singleplayer and multiplayer

Depending on whether you are generating a fresh world or exploring an existing survival save, you can enable operator commands using two official methods.

Method 1: Enabling commands during world creation (Recommended)

When creating a new singleplayer world in Minecraft Java Edition, cheats can be toggled on permanently directly from the setup menu:

  1. From the Minecraft main title screen, click Singleplayer.
  2. Click the Create New World button in the bottom-right corner.
  3. Navigate to the Game tab at the top of the interface.
  4. Scroll down and toggle the Allow Commands button to ON.
  5. Click Create New World at the bottom to launch your sandbox world.
Minecraft Java Edition title screen with the Singleplayer button highlighted
Step 1: Open the Singleplayer menu from the main title screen.
Minecraft Select World screen showing existing saves and the Create New World button
Step 2: Select 'Create New World' to configure permissions for a new save.
Minecraft Game Settings screen with Allow Commands toggled to ON
Step 3: Toggle 'Allow Commands: ON' in the Game tab before generating the world.

Note on Hardcore Mode: If you select Hardcore Mode on the world creation screen, the game automatically locks the 'Allow Commands' button to OFF and greys it out to preserve hardcore difficulty integrity. If you want to use commands in a Hardcore world (e.g., to recover from a world glitch or test redstone), generate the world first and use Method 2 below.

Method 2: Enabling commands in an existing world (The LAN workaround)

If you already have an active survival world or a Hardcore world where cheats were disabled, you can enable them temporarily without restarting:

  1. While inside your active world, press the Esc key to open the Pause Menu.
  2. Click on the Open to LAN button.
  3. Toggle the Allow Cheats setting from OFF to ON.
  4. Click Start LAN World.

Note: This LAN permission remains active for your current play session until you exit and reload the world save.

Opening the console and executing commands

Once cheats are enabled, press / in-game. The game will open the chat window with a forward slash already typed, activating the real-time syntax helper.

Minecraft in-game command prompt showing /gamemode creative with auto-complete tooltip
The in-game command prompt shows parameter suggestions and syntax tooltips in real time.

The Tab auto-complete shortcut

You never need to memorize exact spellings for hundreds of blocks or mobs. Type the base command and the first few letters (e.g. /give @s netherite_), then press the Tab key. Minecraft's command engine will automatically complete the name (e.g. netherite_sword). Pressing Tab repeatedly cycles through all valid matching options.

Relative coordinates (~ and ^)

Instead of typing absolute global numbers like 1450 64 -320, you can use relative coordinates based on your character's current standing position:

  • Tilde notation (~): Represents your current XYZ coordinates. Typing /tp ~ ~10 ~ teleports you exactly 10 blocks straight up into the air. Typing /setblock ~ ~-1 ~ stone places a stone block directly under your feet.
  • Caret notation (^): Represents local coordinates relative to the direction your character's eyes are facing (Left/Right, Up/Down, Forward/Backward). Typing /tp ^ ^ ^5 teleports you 5 blocks forward in the direction you are looking.

Target selectors explained (@s, @p, @a, @r, @e)

When executing commands that target players or entities, typing long player usernames can be tedious. Use these official target selectors instead:

Target SelectorTarget NameWho or What It Targets
@sSelfThe executing entity, usually a player. A command block is not an entity, so @s is empty unless execution is changed with /execute as.
@pNearest PlayerThe single closest player to the execution coordinates.
@aAll PlayersEvery active player currently connected to the world or server.
@rRandom PlayerA randomly selected player in the game.
@eAll EntitiesEvery living mob, player, dropped item, armor stand, and vehicle.

Essential Minecraft commands list (Java 26.3)

1. Game Mode & World Management

Command SyntaxFunctional Effect
/gamemode creativeSwitches to Creative Mode (flying, invulnerability, access to Creative inventory).
/gamemode survivalSwitches to Survival Mode (health, hunger, resource gathering).
/gamemode spectatorSwitches to Spectator Mode (fly through solid walls, invisible to mobs).
/gamerule minecraft:keep_inventory truePrevents losing items, armor, and experience levels upon dying.
/time set daySets the world clock to early morning (1000 ticks) immediately.
/time set nightSets the world clock to nightfall (13000 ticks) immediately.
/weather clear 300sDispels rain or thunderstorms and sets clear sunny skies for 5 minutes.
/weather thunderTriggers heavy thunderstorm weather with dark skies and lightning strikes.
/difficulty peacefulRemoves hostile mobs and prevents hunger depletion.
/setworldspawnSets the default global spawn point for all new players at your current coordinates.

Need more game rule adjustments? Use the interactive MC Toolbox Gamerule Generator to toggle mob griefing, fire spread, and daylight cycle with one click, or test the Gamemode Switcher Tool.

2. Teleportation & Structure Discovery

Command SyntaxFunctional Effect
/tp <x> <y> <z>
Example: /tp 120 70 -450
Teleports your character to the exact coordinates specified.
/tp @s <player_name>
Example: /tp @s Alex
Teleports your character directly to another player's location.
/tp <player_name> @s
Example: /tp Steve @s
Pulls another player directly to your standing location.
/locate structure #minecraft:villageFinds the nearest village and displays its exact coordinates in chat.
/locate structure ancient_cityLocates the closest Deep Dark Ancient City structure.
/locate biome minecraft:cherry_groveReturns the coordinates of the nearest Cherry Blossom biome.
/seedDisplays the world seed string, allowing you to recreate the terrain in the Seed Map Explorer.

Pro-Tip for Teleporting: When you run /locate structure or /locate biome, Minecraft prints the coordinates in green text inside your chat window. Simply left-click on the green coordinate text in the chat to auto-fill the complete /tp command into your chat bar!

Traveling through the Nether? Use the Nether Coordinate Calculator to calculate 8:1 portal links accurately without getting lost.

3. Experience, Status Effects & Survival Buffs

Command SyntaxFunctional Effect
/experience add @s 100 levelsInstantly grants 100 full experience levels (ready for enchanting).
/experience add @s 500 pointsAdds 500 individual experience points to the player's XP bar.
/effect give @s night_vision infinite 1 trueGrants Night Vision until cleared, with hidden particles.
/effect give @s strength infinite 5 trueGrants Strength VI until cleared (massive melee attack damage boost).
/effect give @s speed 120 2 trueGrants Speed III for 120 seconds.
/effect clear @sImmediately removes all active potion and status effects from your character.
/spawnpointSets your personal bed/respawn coordinate to your current standing position.

To create custom potion buffs with exact amplifiers and particles, use the Minecraft Effect Command Generator.

4. Item Management & Modern Component Syntax (Java 26.x)

Java 1.20.5 introduced bracketed item data components. Java 26.x uses those components, including the flat enchantment map shown below. Old cheat codes from legacy websites will produce parsing errors.

Command SyntaxFunctional Effect
/give @s minecraft:diamond 64Gives your character a full stack (64) of raw diamonds.
/give @s netherite_sword[enchantments={sharpness:5,looting:3,unbreaking:3}] 1Spawns a Netherite Sword pre-enchanted with Sharpness V, Looting III, and Unbreaking III.
/give @s netherite_pickaxe[enchantments={efficiency:5,fortune:3,mending:1}] 1Spawns an enchanted Netherite Pickaxe using modern component data.
/clear @sWipes your entire active inventory, armor slots, and off-hand items.
/clear @s poisonous_potatoRemoves only poisonous potatoes from your inventory while keeping other gear safe.

To generate custom items with colored names, lore, unbreakable tags, and custom attributes, use the Minecraft Give Command Generator, lookup IDs in the Item IDs Database, or build custom enchants with the Enchantment Generator.

5. Building, Excavation & Mob Summoning

Command SyntaxFunctional Effect
/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 stoneConstructs an instant 11×11 stone platform beneath your feet.
/fill ~ ~ ~ ~10 ~10 ~10 airClears an 11×11×11 volume, including its interior.
/fill ~-5 ~ ~-5 ~5 ~5 ~5 air replace waterClears all water in an 11×11 area without destroying solid walls.
/summon minecraft:iron_golem ~ ~ ~Spawns a friendly Iron Golem defender at your current position.
/summon minecraft:ender_dragon ~ ~ ~Summons the Ender Dragon in any dimension.
/kill @e[type=zombie,distance=..30]Eliminates all zombies within a 30-block radius while sparing players and pets.

6. Command Blocks & Advanced Automation

If you want to automate repetitive cheat codes, build custom adventure maps, or trigger complex chained mechanics, obtain a Command Block:

/give @s minecraft:command_block 1

Place the block, right-click to open its GUI, and paste any standard command inside. You can power it with Redstone dust, levers, or configure it to Repeat mode for continuous automated execution. If you need to chain conditional logic without writing complex code by hand, you can build and test advanced command chains using the MC Toolbox Execute Command Builder.

Understanding command syntax logic

Every Minecraft command follows a structured, logical sequence similar to programming functions:

Action (/give) to Target (@s) to Item (diamond_sword) to Components ([enchantments={...}]) to Quantity (1)

Mastering this syntax gives you complete creative control over world generation, custom mini-games, server moderation, and survival utility.

Common command syntax errors and questions

Why is 'Allow Commands' locked to OFF in Hardcore Mode?

In Hardcore Mode, the world creation menu intentionally locks 'Allow Commands' to OFF and greys out the button to prevent accidental cheating. To run commands in Hardcore (for example, to recover from a world glitch), open the pause menu, click Open to LAN, and set Allow Cheats: ON.

Why does the game say 'Unknown or incomplete command'?

Check your command permissions and spelling. An unavailable command or outdated item-component syntax can also cause a parsing error.

Does enabling cheats disable achievements / advancements?

On Bedrock Edition (consoles and mobile), enabling cheats permanently disables Xbox achievements for that world save. On Java Edition, achievements are tracked per-world as Advancements and remain active, and commands do not disable them.

What is the difference between Java and Bedrock command syntax?

Both editions have /tp, /gamemode, /time and /weather, but their accepted arguments and duration syntax can differ. However, Bedrock Edition uses raw integer data values or unique JSON components for /give, whereas Java Edition uses modern bracketed Data Components [...].

What happens if I type /kill without any parameters?

Typing bare /kill will immediately kill your own character. To target a specific hostile mob type within a radius, specify the entity type and radius, such as /kill @e[type=skeleton,distance=..20].

Gio Nui

Gio Nui

Independent web developer and editor of MC Toolbox. Guides are maintained alongside the site’s browser-based Minecraft tools, with commands, file formats and version notes reviewed during updates.