While Minecraft does not have outright cheat codes like other games of its era, by using console commands, you can do anything you want in your Minecraft world. From teleport to weather or even spawn mobs, the console commands can do pretty much everything. In this Minecraft cheat codes guide, we are going to showcase a fully upgraded Console Commands list for Minecraft 1.17.

1. How to enable Minecraft cheat codes

To run game commands in Minecraft, you have to turn cheats on in your world. Advancements and achievements are disabled on Cheat worlds, but you can grant them manually in Java.

  • In Minecraft Java Edition, you need to create a new world and select More World Options... from the menu. This will take you to another window where you can toggle Allow Cheats to ON. Afterward, continue to create your world normally.
  • In Minecraft Bedrock Edition, there is a toggle bar on the world creation box itself.
Turning on Cheats
Turning on Cheats in Minecraft

Now you should be able to use Minecraft cheat codes in your world. This does not affect other Minecraft worlds that you have previously created, just the world that you are creating now.

Cheat codes in Minecraft will disable achievements.

2. How to input Minecraft cheat codes

Whether you enter cheat codes in Minecraft Java or Bedrock, note that every command in Minecraft must start with a "/", but using the console shortcut will automatically add the "/" prefix so you can just start typing the command you want to use.

Minecraft commands are also case-sensitive; therefore, capital letters are not allowed.

How to use cheat codes on PC - Minecraft Java

To use a Minecraft command or cheat on PC, all you need to do is hop into your Minecraft game and tap the "/" key to open up the console. Alternatively, you can input cheat codes using the chat window.

For Java Edition (PC/Mac), Windows 10 Edition, Education Edition, press the T key to open the chat window.

console commands
Minecraft console commands input box

How to use cheat codes on Console - Minecraft Bedrock

The easiest way to run Minecraft cheat codes on Console is to use the chat window.

  • Press the D-Pad (right) button on the controller to input Minecraft cheat codes Xbox One.
  • Tap on the chat button help command at the top of the screen to input Minecraft cheat codes Pocket Edition (PE)
  • Press the D-Pad (right) button on the controller to input Minecraft cheat codes PS4.
  • Press the right arrow button on the controller to input Minecraft cheat codes Nintendo Switch.

3. Most useful Minecraft cheat codes/ console commands

Below we are going to go over some of the most useful Minecraft commands and cheats. All the arguments for a command are surrounded by either {angle brackets} or [square brackets]. Angle brackets mean that the argument is required, while square brackets mean that the argument is optional. You can look for item IDs or NBT data tags on the Minecraft wiki - there are thousands of them.


A help command that displays a list of all console commands or gives info about a specific command. You can use this to figure out the rest of the commands.

  • Syntax: /? [command]


This sets the game mode of the specified player.

  • Syntax: /gamemode {mode} [player]


The "tp" or teleport command teleports the specified entity or entities to the specified destination.

  • Syntax:
  • /tp {destination}
  • /tp {location} [rotation]
  • /tp {targets} {destination}
  • /tp {targets} {entity}
  • /tp {targets} {location} facing {facingLocation}
  • /tp {targets} {location} facing entity {facingEntity} [facingAnchor]
  • /tp {targets} {location} [rotation]

Destination is the name of a player (or a target selector) to teleport to. Location or x y z is the x y z coordinate to teleport to.

FacingLocation is the x y z coordinate that the entity will face after being teleported. Targets or entity is the name of a player (or a target selector) to teleport.

TP command
TP command in Minecraft


The time command allows you to check and change the time value of the day

  • Syntax: /time {add|query|set} {value}


Allows you to choose the weather or your world. Options include: rain, thunder and snow.

  • Syntax: /weather {clear|rain|thunder} [duration]


Gives an item to the player.

  • Syntax: /give {player} {item} [count]


Spawn the specified entity or Minecraft mob at the specified position.

  • Syntax: /summon {entity} [position] [NBT data tag]


Kills your character, adding another player’s name will apply the command to them.

  • Syntax: /kill {targets}


Find the location of the closest structure of a specified type. Useful for finding all structures in the game, such as locating Villages, for example.

  • Syntax: /locate {structureType}


Enchant a player's item.

  • Syntax: /enchant {player} {enchantment ID} [level]


The "xp" or experience command adds, sets, removes, or checks a player's XP.

  • Syntax: /xp [add|set] {players} {amount} [points|levels]\
  • /xp query {player} {points|levels}

4. What are arguments and targets?

Besides aforementioned cheat codes in Minecraft, you need to understand some common terms when using these console commands.


Arguments are bits of information that come after the command to define the effect of the command. For example with the cheat /gamemode creative, The command is "/gamemode", and the argument is "creative", this means you are telling the game to set the gamemode to creative.

You need to know the object ID in Minecraft to summon/give.


Targets are a type of argument in Minecraft that tells the game who (or what) you want the command to target. The following are target arguments:

  • @p – nearest player
  • @r – random player
  • @a – all players
  • @e – all entities
  • @s – the entity executing the command

For example, the command: /gamemode creative @a will set the game mode of every player on the server to Creative Mode. If you replaced @a with @r, it will set the game mode of a random player on the server instead.

Interested in more of our articles related to Minecraft? Please check this post to find out more about How To Kill All Mobs In Minecraft Fast And Simple