All the Minecraft cheats and commands you'll ever need

Minecraft The Wild update 1.19
(Image credit: Mojang)

Minecraft cheats are used via commands, special code inputs that go into the console and allow you to tweak features and elements of your game, including teleporting, creating items and more. Unfortunately you can only do this if you're playing the PC version of the game, where Minecraft cheats are implemented properly. People in PlayStation, Xbox, Switch or Mobile versions of Minecraft won't be able to cheat sadly, but for those who are PC users, we can show you how to take almost total control and use Minecraft cheats and commands to your heart's content, as well as a full command list to work from.

How to use Minecraft commands

Upcoming video game movies - Minecraft

(Image credit: Microsoft)

To use cheats in Minecraft, either Bedrock or Java Edition, do the following:

  1. Open Minecraft singleplayer
  2. Create a new world
  3. Go to Game Settings
  4. Click on "Allow Cheats" so that it's toggled on
  5. Generate and enter the world
  6. Once inside the world, press the forward slash key (/) to open the chat window
  7. Enter the command and press enter
  8. (You can also use the up/down arrow keys to scroll through previous commands)
Minecraft The Wild update

Minecraft The Wild update 1.19

(Image credit: Mojang)

Find out everything included in the Minecraft The Wild update here!

If you've already started a game and want to enable cheats, you can do this from the Game Settings menu by hitting ESC and tweaking it there. You'll need to be the creator of the world you're in, however! Visitors to your world can't edit it or change elements, as it's not their world to do so.

When it comes to actually entering commands, instead of typing in individual player name(s) for the player prompt, you can use the following shortcuts to select specific targets for your command:

  • @p = the nearest player to you 
  • @r = a random player 
  • @a = all players in the world 
  • @e = all entities in the world 
  • @s = you

For coordinates, these are expressed as x y z, where x is the distance east (+) or west (-) of the origin point, z is the distance south (+) or north (-) of the origin point, and y is the height from 0 to 255, where 64 is sea level. You can also use tilde (~) or caret (^) notation with a number to express relative coordinates offset from your current position, with the notation by itself representing ~0 or ^0 ie no offset. Tilde offsets are based on the world coordinates, so ~5 ~ ~-5 would be +5 blocks on x (east), 0 blocks on y (same height), and -5 blocks on z (north). Caret offsets are based on the direction the player's head is facing along left, upward, and forward axes, so ^5 ^ ^-5 would be 5 blocks left, 0 blocks upward (same height), and 5 blocks backward.

Minecraft commands

Minecraft player cheats and commands

  • /kill [player] 
    • Kill yourself (or specified player)
  • /tp [player] <x y z> 
    • Teleport yourself (or specified player) to the coordinates entered
  • /effect <player|entity> <effect> [duration] 
    • Applies the effect to the specified player or entity, for an option duration in seconds. A list of effect codes is here
  • /effect clear <player|entity> [effect] 
    • Clear all effects, or optionally just the specified effect, from the player or entity
  • /enchant <player> <enchantment> [level] 
    • Apply the enchantment to the specified player's selected item, at an optional level. A list of enchantment code is here
  • /experience add <player> <amount> 
    • Adds the stated amount of experience points to the specified player. Put the word levels on the end to add experience levels instead

Minecraft commands

Minecraft world and environment cheats and commands

  • /seed 
    • Produces a seed code so you can recreate your world later
  • /setworldspawn [x y z] 
    • Set the world spawn location to the player's current position, or optional specified coordinates if entered
  • /gamemode <type> [player] 
    • Sets the game mode type (use survival, creative, adventure, or spectator) for yourself or an optional player
  • /gamerule <rule> [value] 
    • Queries the value of a game rule, or amends it if an optional value is entered. A list of rule codes is here
  • /difficulty <level> 
    • Sets the difficulty level (use peaceful, easy, normal, or hard)
  • /time set <value> 
    • Sets the world game time, use 0 (Dawn), 1000 (Morning), 6000 (Midday), 12000 (Dusk), or 18000 (Night) as the value
  • /gamerule doDaylightCycle false 
    • Turn off the day/night cycle, replace false with true to reactivate
  • /weather <type> [duration] 
    • Sets the weather type (use clear, rain, or thunder) for an optional duration in seconds
  • /gamerule doWeatherCycle false 
    • Turn off weather changes, replace false with true to reactivate
  • /clone <x1 y1 z1> <x2 y2 z2> <x y z> 
    • Clones the blocks in the region between coordinates <x1 y1 z1> and <x2 y2 z2>, then places them with coordinates <x y z> in the lower northwest corner

Minecraft commands

Minecraft Item and Mob cheats and commands

  • /give <player> <item> [quantity] 
    • Adds item to player's inventory, in specified quantity if item is stackable. A list of item codes is here
  • /gamerule keepInventory true 
    • Keep your inventory items after you die, replace true with false to reverse
  • /summon <entity> [x y z] 
    • Spawns the entity at the player's location, or optional specified coordinates if entered. A list of entity codes is here

Those should be more than enough Minecraft cheats to let you mess around in your worlds to your heart's content. If you need any more assistance with using any of these commands, then simply type /help [command] for additional information and guidance.

Minecraft cheats | Best Minecraft servers | Minecraft Realms | Best Minecraft seeds | Best Minecraft mods | Best Minecraft shaders | Best Minecraft skins | Best Minecraft texture packs | Play Minecraft for free | Minecraft Forge

Minecraft The Wild update | Minecraft Allay | Minecraft frogs

Iain Wilson
Guides Editor

Iain originally joined Future in 2012 to write guides for CVG, PSM3, and Xbox World, before moving on to join GamesRadar in 2013 as Guides Editor. His words have also appeared in OPM, OXM, PC Gamer, GamesMaster, and SFX. He is better known to many as ‘Mr Trophy’, due to his slightly unhealthy obsession with amassing intangible PlayStation silverware, and he now has almost 500 Platinum pots weighing down the shelves of his virtual award cabinet. He does not care for Xbox Achievements.

With contributions from