OGTOOLS

Minecraft commands

What each command does, how to type it and who can use it, all in one list. Type the command you are looking for or pick a category; each command's own page has its syntax, arguments and examples you can copy and paste straight into chat.

Minecraft 26.3  87 commands · Java Edition · list reviewed on 2026-10-14
Another tool Minecraft crafting recipes Would rather make the item than give it with a command? See the recipe on the 3x3 grid.

87 commands listed

💬 Basic commands

Chat, help and the commands every player can use. Category page →

🧍 Player commands

Changing game modes, teleporting, effects, experience and inventory. Category page →

/advancement Grants or revokes advancements Unlocks or removes a player's advancements. /attribute Changes entity attributes Permanently sets base values like max health, speed and attack damage. /defaultgamemode Sets the default mode for new players Sets which mode a player starts in when they join the world for the first time. /effect Gives or clears effects Gives status effects like Speed, Night Vision or Poison, or removes them all. /experience Gives experience points and levels Adds or removes XP points or whole levels for a player, or checks the current value. /gamemode Changes the game mode Switches between Survival, Creative, Adventure and Spectator modes. /rotate Changes the direction an entity is facing Turns only the target's view, without teleporting it. /spawnpoint Sets a player's spawn point Sets the coordinates where a player wakes up after dying. /spectate Watches through another entity's eyes in Spectator mode In Spectator mode, switches to a player's or mob's camera. /tag Adds invisible tags to entities Marks entities; then you target that group with tag=... in a selector. /team Creates and manages teams Splits players into teams; you can set color, friendly fire and name tag visibility. /teleport Teleports a player or entity Moves a target to given coordinates, next to another entity or to another dimension. /tellraw Sends formatted, colored and clickable messages Prints a message with color, bold text, click and hover actions using a JSON text component. /title Shows big text in the middle of the screen Sends a title, subtitle or action bar text to a player's screen.

🐷 Mobs and entities

Summoning, killing, riding and damaging mobs. Category page →

🎒 Item commands

Giving, clearing and enchanting items, and unlocking recipes. Category page →

🌍 World and time

Time, weather, difficulty, game rules and the world border. Category page →

🧱 Blocks and structures

Placing blocks, filling areas, cloning and placing structures. Category page →

🛡️ Server management

Permissions, bans, the whitelist, saving and shutting down. Category page →

/ban Bans a player from the server Kicks a player and blacklists them so they cannot join again. /ban-ip Bans an IP address Bans the address a player connects from; it also stops them joining with a new account. /banlist Lists banned players Shows banned players or banned addresses. /deop Takes away operator permissions Removes a player's operator status. /kick Kicks a player from the server Cuts a player's connection without banning them; they can join again. /op Gives a player operator permissions Makes a player an operator: They can now use commands. /pardon Lifts a player's ban Allows a banned player to join again. /pardon-ip Lifts an IP ban Removes an address banned with ban-ip from the blacklist. /publish Opens a singleplayer world to LAN Opens the world you are playing to friends over LAN and tells you the port. /save-all Saves the world to disk Instantly writes all of the server's in-memory changes to file. /save-off Stops autosave Temporarily turns off saving so the files do not change while you take a backup. /save-on Turns autosave back on Restarts the autosave that was stopped with save-off. /setidletimeout Sets the idle timeout Sets after how many minutes of inactivity a player is kicked. /stop Shuts down the server safely Saves the world and stops the server properly. /transfer Transfers a player to another server Connects a player's game to another server without making them log out. /unpublish Closes LAN sharing Closes the world you opened to LAN again; connected players are disconnected. /version Shows the game version Prints the Minecraft version the server or world runs on, with its data and resource pack versions. /whitelist Manages the whitelist Lets only the players on the list join the server.

⚙️ Advanced commands

Command block and data pack work: execute, data, scoreboard, function. Category page →

/data Reads or writes entity, block and storage data Views, changes, copies or removes NBT data. /datapack Manages data packs Lists, enables and disables installed data packs and changes their order. /debug Starts and stops performance profiling Records what the server is doing and writes the result to the debug folder. /dialog Opens a dialog window for a player Shows a dialog window defined in a data pack on a player's screen. /execute Runs a command under different conditions Runs a command as someone else, at another position or only if a condition is met. /fetchprofile Fetches a player profile Resolves a player's profile (ID and skin info); you can then get their head or summon a mannequin. /function Runs a command file Runs the commands written in a data pack's .mcfunction file, in order. /jfr Takes a Java Flight Recorder recording Starts an in-depth performance recording with Java Flight Recorder. /perf Records server performance Takes a 10-second performance sample and produces a report file. /posteffect Applies a visual effect to the screen Adds or removes screen effects such as blur or color inversion for a player. /random Generates a random number Gives a random value in the range you set, or resets the sequence seed. /reload Reloads data packs Applies changes to function, loot table and recipe files without restarting the server. /return Returns a value from a function Ends the running function early and gives a result value. /schedule Schedules a function for later Plans a function to run after the time you set. /scoreboard Sets up and manages scoreboards Creates score objectives, changes player scores and shows them on screen. /stopwatch Sets up a stopwatch and measures time Starts named stopwatches and checks the elapsed time; for timing parkour and race maps. /waypoint Manages waypoints Sets the color and style of the markers shown on the locator bar.

How do you use commands in Minecraft?

Commands are typed into the chat window. On PC, open chat with T; if you press / on its own, chat opens ready for a command. Type the command and press Enter. While typing, Tab opens the autocomplete list, so you do not need to memorize item, mob or block IDs.

In a singleplayer world, commands only work with cheats enabled. If you did not tick "Allow Cheats" when creating the world, pause the game and allow commands from the "World Options" screen (before 26.2 this setting was on the "Open to LAN" screen). On a server you need operator permission; the server owner grants it with the /op command.

Some commands are open to everyone: /help, /msg and /list need no permission. Every command in the list shows the permission level it needs.

Target selectors: @a, @p, @r, @s, @e

Most commands ask "who?". Instead of a player name you can use short selectors:

SelectorMeaning
@sThe entity running the command. The most common one.
@pThe nearest player.
@aEvery player on the server.
@rA random player.
@eEvery entity: Players, mobs, items on the ground.
@e[type=zombie,distance=..10]Filtered with square brackets: Zombies within 10 blocks.

Commands that take coordinates accept three forms: Plain numbers are absolute positions (100 70 -240), the tilde is relative to where you stand (~ ~10 ~ means ten blocks up) and the caret is relative to where you are looking (^ ^ ^5 is five blocks forward).

Common questions

My commands do not work. What should I do?

The cause is almost always the same: Cheats are off or you lack permission. In a singleplayer world you can allow commands from the "World Options" screen in the pause menu. On a server the owner has to give you permission with /op. If a command shows up red while you type, the syntax is wrong; use Tab completion.

Which command keeps my items when I die?

Type /gamerule keep_inventory true. Rule names changed in 1.21.11: The old keepInventory spelling now gives an error.

Which version are these commands for?

Minecraft 26.3 (Java Edition). Most commands are the same in Bedrock Edition, but some have different syntax and some do not exist at all. We review the list as new versions come out.

Can I use these commands in a command block?

Yes, most commands in the list work in a command block. Get one with /give @s command_block; inside the block you do not need the leading slash. A few chat-only commands (such as /help) make no sense in a block.

Minecraft is a product of Mojang Studios. This tool is an independent helper made for players and is not affiliated with Mojang or Microsoft.