
Minecraft commands are text instructions that let you bend the game to your will – change the time, spawn mobs, give yourself items, teleport (like jumping back to your last death point), build instantly, and run whole servers. This is a comprehensive, categorized Minecraft commands list with the exact syntax and a copy-paste example for each, fact-checked against the Minecraft Wiki on October 9, 2026 for Java Edition 26.3 (Wilderness Bound, released September 2026) and Bedrock Edition 26.52.
It’s written for Java Edition (now on the year-based 26.x versioning Mojang introduced in 2026), with Bedrock differences flagged where they matter. Use your browser’s Find (Ctrl/Cmd + F) to jump to any command fast.
How to Use Minecraft Commands
Turn on cheats first. Commands only work if cheats are enabled. When creating a world, turn on Allow Commands (labeled “Allow Cheats” on Bedrock and in older Java versions). In an existing single-player world, enable it for the session via Esc > World Options > General > Allow Commands: ON.

Type in chat. Press T (or /) to open chat, then type the command starting with a forward slash, e.g. /time set day, and press Enter.
Command blocks run commands automatically via redstone. Get one with /give @p command_block (it can’t be crafted).

Target selectors save you typing player names:
@p– nearest player@a– all players@r– a random player@e– all entities@s– yourself (whoever runs the command)
You can filter them, e.g. @e[type=zombie,distance=..10] targets zombies within 10 blocks.
Coordinates: use exact numbers (100 64 -200), ~ for relative to you (~ ~5 ~ = 5 blocks up), or ^ for coordinates relative to where you’re facing.
Essential Commands (The Ones You’ll Use Most)
| Command | What it does | Example |
|---|---|---|
/help [command] | Lists commands or shows help for one | /help give |
/gamemode <mode> [target] | Changes game mode (survival, creative, adventure, spectator) | /gamemode creative @s |
/give <target> <item> [count] | Gives items to a player | /give @p diamond 64 |
/tp <target> <destination> | Teleports a player or entity (alias of /teleport) | /tp @s 100 70 -200 |
/time set <value> | Sets the time (day, night, noon, midnight, or a number) | /time set day |
/weather <type> [duration] | Sets weather (clear, rain, thunder) | /weather clear |
/difficulty <level> | Sets difficulty (peaceful, easy, normal, hard) | /difficulty hard |
/kill [target] | Kills a player or entity | /kill @e[type=item] |
/clear [target] [item] | Clears items from inventory | /clear @p |
/seed | Shows your world’s seed | /seed |
Player & Inventory Commands
| Command | What it does | Example |
|---|---|---|
/give <target> <item> [count] | Gives an item | /give @p netherite_sword 1 |
/clear [target] [item] [maxCount] | Removes items (all, or a specific item) | /clear @a dirt |
/xp add <target> <amount> [points|levels] | Adds experience (alias /experience) | /xp add @s 30 levels |
/effect give <target> <effect> [secs] [amplifier] | Applies a status effect | /effect give @s speed 60 2 |
/effect clear [target] [effect] | Removes status effects | /effect clear @s |
/enchant <target> <enchant> [level] | Enchants the held item | /enchant @p sharpness 5 |
/attribute <target> <attribute> ... | Reads/modifies entity attributes | /attribute @s minecraft:max_health get |
/item replace ... | Replaces an item in a slot | /item replace entity @s weapon.mainhand with diamond |
/recipe <give|take> <target> <recipe> | Unlocks or removes recipes | /recipe give @a * |
/spawnpoint [target] [pos] | Sets a player’s respawn point | /spawnpoint @s ~ ~ ~ |
World & Environment Commands
| Command | What it does | Example |
|---|---|---|
/time set|add|query ... | Sets, adds to, or queries the daylight cycle (26.1+ also supports /time of <clock> ... for world clocks) | /time add 1000 |
/weather <type> [duration] | Controls weather | /weather thunder 600 |
/gamerule <rule> [value] | Changes a game rule (see list below) | /gamerule keep_inventory true |
/setblock <pos> <block> [mode] | Places a single block | /setblock ~ ~ ~ stone |
/fill <from> <to> <block> [mode] | Fills a region with a block | /fill ~ ~ ~ ~10 ~5 ~10 glass |
/clone <from> <to> <dest> [mode] | Copies a region of blocks | /clone 0 64 0 10 70 10 50 64 50 |
/setworldspawn [pos] | Sets the world spawn point | /setworldspawn 0 64 0 |
/worldborder set <size> [time] | Sets the world border size | /worldborder set 1000 |
/forceload add <from> [to] | Keeps chunks loaded | /forceload add ~ ~ |
/locate structure <id> | Finds the nearest structure | /locate structure village |
/locate biome <id> | Finds the nearest biome | /locate biome desert |
/fillbiome <from> <to> <biome> | Changes the biome in a region | /fillbiome ~ ~ ~ ~16 ~ ~16 plains |
/place structure|feature|jigsaw <id> | Places a generated structure/feature | /place feature minecraft:fossil |
Entity & Mob Commands
| Command | What it does | Example |
|---|---|---|
/summon <entity> [pos] [nbt] | Spawns an entity | /summon lightning_bolt ~ ~ ~ |
/kill [target] | Kills entities | /kill @e[type=creeper] |
/tp <target> <destination> | Teleports entities | /tp @e[type=pig] @s |
/ride <target> mount|dismount <vehicle> | Mounts/dismounts entities | /ride @s mount @e[type=horse,limit=1] |
/damage <target> <amount> [type] | Deals damage to an entity | /damage @e[type=zombie] 5 |
/data get|merge|modify ... | Reads or edits entity/block NBT data | /data get entity @s |
/tag <target> add|remove|list [name] | Adds custom tags to entities | /tag @s add boss |
/spreadplayers <x> <z> <spread> <max> ... | Scatters players/entities randomly | /spreadplayers 0 0 50 200 false @a |
Multiplayer & Server Commands
| Command | What it does | Example |
|---|---|---|
/op <player> | Grants operator (admin) status | /op Notch |
/deop <player> | Removes operator status | /deop Notch |
/kick <player> [reason] | Removes a player from the server | /kick Steve AFK |
/ban <player> [reason] | Bans a player | /ban Griefer |
/pardon <player> | Unbans a player | /pardon Griefer |
/whitelist <add|remove|on|off|list> | Manages the server whitelist | /whitelist add Alex |
/list | Lists online players | /list |
/msg <targets> <message> | Private message (aliases /tell, /w) | /msg Alex on my way |
/team <add|join|modify> ... | Manages teams | /team add red |
/transfer <host> [port] [players] | Sends players to another server | /transfer play.example.com |
/save-all / /stop | Saves the world / stops the server | /save-all |
/defaultgamemode <mode> | Sets the mode new players join in | /defaultgamemode survival |
Display & Technical Commands
| Command | What it does | Example |
|---|---|---|
/execute ... | Runs commands conditionally / as other entities | /execute as @a at @s run tp ~ ~10 ~ |
/scoreboard objectives|players ... | Creates and manages scoreboards | /scoreboard objectives add kills playerKill |
/title <target> <title|subtitle|actionbar> <json> | Shows on-screen text | /title @a title {"text":"Game Over"} |
/tellraw <target> <json> | Sends formatted chat text | /tellraw @a {"text":"Hello!","color":"gold"} |
/bossbar add|set ... | Creates a custom boss bar | /bossbar add fight {"text":"Boss"} |
/particle <name> [pos] ... | Spawns particles | /particle heart ~ ~1 ~ |
/playsound <sound> <source> <target> | Plays a sound | /playsound minecraft:entity.wither.spawn master @a |
/function <id> | Runs a datapack function | /function mypack:start |
/datapack <list|enable|disable> | Manages datapacks | /datapack list |
/tick <query|rate|freeze|step|sprint> | Controls the game’s tick rate | /tick rate 10 |
/random <value|roll> ... | Generates random numbers | /random value 1..6 |
/spectate <target> | Spectate an entity (spectator mode) | /spectate @e[type=ender_dragon,limit=1] |
New Commands in Minecraft 26.x
The 2026 updates added a few commands worth knowing (and renamed all game rules to snake_case — see the next section):
| Command | What it does |
|---|---|
/waypoint list | Lists the waypoints tracked on the Locator Bar |
/waypoint modify <waypoint> color <color> | Changes a waypoint color (also supports color hex |
/swing [<targets>] [mainhand|offhand] [<animation>] [<duration>] | Makes entities swing an arm. 26.3 added the animation (whack, stab, none) and duration options (default 6 ticks) |
/fetchprofile (name|id|entity) ... | Fetches a player profile (name, UUID and skin) by name, ID, or from an entity, for example /fetchprofile entity @s |
/publish [<allowCommands>] [<port>] | Opens your single-player world to others on your network. In 26.3 this replaces the old Open to LAN button; the game mode option was removed |
/unpublish | Closes a world you opened with /publish |
/stopwatch create|query|restart|remove <id> | Real-time stopwatch that ignores tick rate and lag (added in 1.21.11) |
/rotate <target> <rotation> | Sets the facing of an entity; also /rotate |
More Java Commands for Servers and Map Makers
These Java Edition commands are less common in everyday survival, but you will run into them on servers, in adventure maps, and in data packs. Most need permission level 2 or higher. The Wiki also lists /compute, /dialog, /posteffect and /test for data pack and map creators.
| Command | What it does | Example |
|---|---|---|
/advancement grant|revoke <targets> everything | Gives or removes advancements | /advancement grant @s everything |
/loot give <players> loot <loot_table> | Gives the items from a loot table, or from a mined block or killed mob | /loot give @s loot minecraft:chests/simple_dungeon |
/say <message> | Broadcasts a message to everyone | /say Server restarting in 5 minutes |
/me <action> | Shows an action message about yourself in chat | /me waves |
/teammsg <message> | Messages only your team (alias /tm) | /tm Meet at spawn |
/trigger <objective> [add|set <value>] | Lets non-operators run a scoreboard trigger that a map set up | /trigger shop set 1 |
/schedule function <function> <time> [append|replace] | Runs a data pack function after a delay | /schedule function mypack:start 5s |
/reload | Reloads data packs, loot tables, advancements and functions | /reload |
/return <value>|fail|run <command> | Ends a function early and sets its result | /return 1 |
/stopsound <targets> [<source>] [<sound>] | Stops sounds that are playing | /stopsound @a music |
/version | Shows the server game version (permission level 2) | /version |
/ban-ip <target> [reason] | Bans an IP address (undo with /pardon-ip; /banlist lists bans) | /ban-ip 192.0.2.10 Griefing |
/save-off, /save-on | Turns automatic world saving off or on (use /save-all to save once) | /save-off |
/setidletimeout <minutes> | Kicks idle players after this many minutes (0 disables) | /setidletimeout 30 |
/perf start|stop, /jfr start|stop, /debug start|stop | Server profiling and debugging tools for admins (permission level 3 or 4) | /perf start |
Most Useful Game Rules
Type the full command in chat (cheats must be on). These are the current Java 26.x names (lowercase snake_case):
/gamerule keep_inventory true– keep your items when you die/gamerule advance_time false– freeze the time of day/gamerule advance_weather false– freeze the weather/gamerule mob_griefing false– stop creepers/endermen from changing blocks/gamerule spawn_monsters false– stop hostile mobs from spawning/gamerule spawn_phantoms false– stop phantoms from spawning/gamerule fire_spread_radius_around_player 0– stop fire spreading near you/gamerule random_tick_speed 3– control how fast crops grow / fire spreads (default 3)/gamerule show_death_messages false– hide death messages/gamerule command_block_output false– stop command-block spam in chat/gamerule players_sleeping_percentage 50– % of players needed to sleep through night
Java vs Bedrock: Key Differences
Most commands work the same across both editions, but watch for these:
- Game mode by number (Bedrock): Bedrock also accepts
/gamemode 0(survival),1(creative) and2(adventure). Java requires the mode names. - Argument formats differ: commands such as
/enchant,/giveand/summonexist in both editions, but some arguments and item or component data are written differently. - Java-only:
/datapack,/data,/attribute,/tick,/random,/bossbar,/waypoint,/stopwatchand Java’s advanced/executesubcommands are Java-focused (Bedrock has equivalents but different syntax). - Bedrock extras: Bedrock has unique commands like
/camera,/inputpermission,/dialogue, and education-style commands not present in Java. - Coordinates and selectors (
@p,@e,~,^) work in both editions.
When in doubt, the in-game auto-complete (it suggests valid arguments as you type) is the fastest way to confirm syntax for your exact version.
Frequently Asked Questions
Turn on “Allow Commands” when creating a world, or turn on Allow Commands for an existing single-player world (Esc > World Options > General > Allow Commands: On). On a server, you need operator status via /op. Then type commands in chat starting with /.
/give. Use /give [count] – for example, /give @p diamond 64. In creative mode you can also pull items straight from the inventory menu.
Run /gamerule keep_inventory true. Set the value back to false to return to normal.
/time set day. You can also use /time set night, /time set noon, or a number like /time set 6000.
Most do, with small syntax differences – for example, Bedrock uses /gamemode 0 for survival, and some Java-only commands (/datapack, /data, /tick) are not available. The essentials like /give, /tp, /time, /weather, and /effect work on both.
On Bedrock, yes: enabling cheats in a world permanently prevents achievements in that world, even if you turn cheats off later. On Java, enabling commands does not stop you from earning advancements. If you want Bedrock achievements, keep a separate world with cheats off.
Yes – this list was fact-checked against the Minecraft Wiki on October 9, 2026 for Java Edition 26.3 (Wilderness Bound, released September 2026) and Bedrock Edition 26.52. Mojang adds or changes a few commands in most updates, so the in-game auto-complete always reflects your exact version.
Commands turn Minecraft from a survival game into a sandbox you fully control – whether you’re setting up a server, building with /fill and /clone, or just flipping on keep_inventory for a relaxed run. Bookmark this page, use Ctrl + F to find what you need, and start with the essentials table above.
For more, explore our best Minecraft mods and the full Minecraft guides hub.



