Skip to Content

List of Minecraft Commands and Cheat Codes (2026)

List of Minecraft Commands and Cheat Codes (2026)

When playing Minecraft, it is possible to type commands into the chat box (opened by pressing “T” or “/”). These commands can trigger useful changes such as changing the time of day and weather or also provide utility such as teleporting around the map or giving items.

While in a multiplayer Minecraft game, these commands are helpful for Admins to do their job running the server. However, in a single-player game by yourself, these commands can be considered as “cheat codes” to make the game easier.

Most commands or cheat codes have some restrictions in Minecraft. On a multiplayer server, for most commands the player needs to be a server operator/admin (OP) and on a single-player game the “allow cheats” option must be selected when first creating the world.

Note that server plugins and modpacks can add new commands to the game. This list will only cover the commands and cheats available in the base version of the game without any mods or plugins. Multiplayer servers will often have additional and different commands available.

Here is our list of the most popular and common Minecraft Commands and Cheat Codes, organized by category with copy and paste examples. This list is current as of Minecraft 26.2.

The 10 Most Useful Minecraft Cheats

If you just want the best cheats without reading the whole list, start with these:

Cheat What it does Copy and paste example
/gamemode Switch between survival and creative /gamemode creative
/give Give yourself any item /give @s diamond 64
/tp Teleport anywhere instantly /tp @s 0 100 0
/gamerule keepInventory Keep your items when you die /gamerule keepInventory true
/time set Skip to day or night /time set day
/weather Stop the rain /weather clear
/locate Find the nearest structure /locate structure mansion
/effect Give yourself potion effects /effect give @s speed 300 2
/enchant Enchant the item in your hand /enchant @s sharpness 5
/summon Spawn any mob /summon creeper
minecraft commands and cheats

Target Selectors: @s, @p, @a, and @e

Many commands ask for a player name. Instead of typing a name, you can use these shortcuts, which are called target selectors:

Selector Who it targets
@s Yourself (the player running the command)
@p The nearest player
@a All players
@e All entities (mobs, items, players)
@r One random player

For example, /give @s diamond 64 gives the diamonds to you, while /give @a diamond 64 gives 64 diamonds to every player on the server.

General Minecraft Commands

The following commands can be used by any player in all Minecraft games (unless restricted by a multiplayer server owner):

Command What it does Copy and paste example
/help or /? Provides a list of common commands /help
/list Provides a list of players online /list
/me Sends an “emote” message into chat /me waves hello
/msg Sends a private message to the player specified. Alternatively, /tell and /w are the same as /msg /msg Steve hello there
/seed Displays the map seed /seed
/teammsg Sends a private message to your team. Alternatively, /tm can also be used. Only available in Java Edition, and teams are created by OPs /teammsg on my way

Gamemode and Difficulty Cheats

These commands (and everything below) can only be used by OPs / Admins of a multiplayer server, or when “allow cheats” is enabled in a single-player game.

Command What it does Copy and paste example
/gamemode Changes a player’s gamemode. Commonly used by admins to switch between survival and creative mode /gamemode creative
/difficulty Changes the game’s difficulty (easy, normal, hard, or peaceful) /difficulty peaceful
/gamerule keepInventory Keeps your items and XP when you die. Probably the most popular cheat in the game! /gamerule keepInventory true

Item and Inventory Cheats

Command What it does Copy and paste example
/give Gives the specified item to the player in the amount specified /give @s netherite_sword 1
/clear Deletes all items in your inventory /clear
/enchant Enchants a player’s gear. For example, /enchant Bob fortune 3 will enchant Bob’s tool with Fortune 3 /enchant @s fortune 3
/xp Adds to or sets a player’s experience by the amount specified. May also use /experience for same effect in Java Edition /xp add @s 30 levels

Teleport and Location Commands

Command What it does Copy and paste example
/tp Teleports one player (the target) to either another player or coordinate (the destination). For example, /tp Bob Joe will teleport the player “Bob” to “Joe” /tp @s 0 70 0
/locate structure Displays coordinates for the nearest specified structure. For example, /locate structure mansion will display coordinates for the nearest Woodland Mansion /locate structure village
/locate biome Displays coordinates for the nearest specified biome. In older versions this was the separate /locatebiome command /locate biome cherry_grove
/setworldspawn Changes the world spawn to the player’s location. If executed in the console, coordinates would need to be provided /setworldspawn
/spawnpoint Changes an individual player’s respawn point to this location /spawnpoint Steve

World, Time, and Weather Cheats

Command What it does Copy and paste example
/time set Changes the time of the day. For example, /time set day will automatically set the time to morning /time set day
/time add Fast-forwards the time by adding to the time-value /time add 1000
/weather Toggles the weather for the specified duration in seconds. If no duration is specified, the weather change will last for 5 minutes /weather clear
/forceload Forces a chunk to stay loaded. Only applicable to Java Edition /forceload add ~ ~
/worldborder Toggles the world border, only useable in Java Edition /worldborder set 1000

Mob and Entity Cheats

Command What it does Copy and paste example
/summon Spawns an entity, for example a creeper. A custom position can be specified but is not required /summon creeper
/kill Kills the specified player or entity /kill Steve
/effect give Modifies status effects on players. Specify the effect, how long it lasts in seconds, and the strength /effect give @s speed 300 2
/effect clear Removes all status effects from a player /effect clear @s

Multiplayer Server Management Commands

Note: The majority of these commands can be used in the server’s console without using the slash. For example, for a brand new server you can make yourself an OP by typing “op [name]” directly into the console, or you could save the map by typing “save-all”.

Command What it does Copy and paste example
/kick Kicks the player from the server. The player is free to rejoin at any time /kick Steve
/ban Bans a player from the server /ban Steve
/ban-ip Bans a player’s IP from the server /ban-ip Steve
/banlist Displays the players currently banned from the server /banlist
/op Assigns a player as a server operator (OP) /op Steve
/deop Revokes a player’s OP status /deop Steve
/pardon Unbans a player from the server /pardon Steve
/pardon-ip Unbans a player’s IP from the server /pardon-ip 192.0.2.1
/save-all Saves the game world /save-all
/stop Turns off the server /stop
/save-off and /save-on Toggles whether the server should automatically save at intervals. If turned off, the server is only saved by the /save-all command /save-off
/say Announces a message to the entire server /say Server restarting soon!
/team Allows for creation of teams, which can chat with each other exclusively using /tm /team add builders
/whitelist Toggles whitelist functions. A whitelist is a list of players who are allowed to join the server and is useful for stopping griefers or random people from joining your server /whitelist add Steve

For the whitelist: it can be turned on or off with /whitelist on and /whitelist off. To view the full list, /whitelist list is used. Player names can be added or removed using /whitelist add [name] and /whitelist remove [name]. If the whitelist text file is modified, /whitelist reload will update the list from the file.

Frequently Asked Questions

How do you enable cheats in Minecraft?

In single player, turn on “Allow Cheats” when creating your world. In an existing Java world, open the pause menu, click “Open to LAN”, and enable cheats there. On a server, an admin must make you an operator with the /op command.

What is the command to keep your inventory when you die?

Type /gamerule keepInventory true into chat. After that, you will keep all your items and XP every time you die. Type /gamerule keepInventory false to turn it back off.

Do cheats disable achievements?

Yes. Turning on cheats disables achievements (Bedrock) and advancements do not count for that world in the same way. If you care about achievements, make a separate world for playing with commands.

What is the give command in Minecraft?

The give command is /give [player] [item] [amount]. For example, /give @s diamond 64 gives you a full stack of 64 diamonds. Cheats must be enabled for it to work.

That concludes our list of Minecraft commands and cheat codes! Did we miss a command you use all the time? Leave a comment below!

Fiery Gragon777

Sunday 23rd of February 2025

I want the cheats very much