Every Minecraft command worth copy-pasting — give, teleport, time, weather, effects, gamerules and more — plus how to turn cheats on (including the Open-to-LAN trick for survival worlds). Java Edition. Search, copy, paste.
Open chat with T (or /) and type a command — they all start with a slash.
Commands need cheats on: play in Creative, make a world with Allow Cheats: On, or be a server operator.
Survival cheat trick: pause → Open to LAN → set Allow Cheats: On → Start LAN World. Cheats work for that session — nobody else needs to join.
@p nearest player, @a all, @e entities, @s yourself. Coordinates: ~ = relative to you, ^ = relative to where you're facing. Server-only commands (op, ban, kick, whitelist) won't run in single-player. Game-rule names below are camelCase (Java 1.21.0–1.21.10); the newest snapshots renamed them to snake_case (e.g. keep_inventory).Type to filter, hit Copy, paste in-game. 38 commands. Placeholders in [brackets] are values you fill in.
| Command | What it does | Category |
|---|---|---|
| /gamemode [survival/creative/adventure/spectator] [player] | Set a player's game mode (omit player to set your own). | Player |
| /effect give [targets] [effect] [seconds] [amplifier] | Apply a status effect — e.g. /effect give @s minecraft:night_vision infinite 0 true. | Player |
| /effect clear [targets] [effect] | Remove one or all status effects. | Player |
| /xp add [targets] [amount] [levels/points] | Add experience (alias /experience). Negative subtracts. | Player |
| /kill [targets] | Kill entities — /kill @e[type=!player] clears all mobs/items. | Player |
| /spawnpoint [targets] [pos] | Set a player's personal respawn point. | Player |
| /give [targets] [item] [count] | Give an item — e.g. /give @p minecraft:diamond_sword[enchantments={"minecraft:sharpness":5}]. (1.20.5+ uses [components], not NBT.) | Items / Inventory |
| /enchant [targets] [enchantment] [level] | Enchant the held item — e.g. /enchant @s minecraft:mending 1. | Items / Inventory |
| /clear [targets] [item] [maxCount] | Clear items from inventory (no args clears everything). | Items / Inventory |
| /time set [day/night/noon/midnight/ticks] | Set the time (day=1000, noon=6000, night=13000, midnight=18000). | World / Time / Weather |
| /weather [clear/rain/thunder] [duration] | Set the weather. | World / Time / Weather |
| /difficulty [peaceful/easy/normal/hard] | Set difficulty (no arg shows the current one). | World / Time / Weather |
| /setworldspawn [pos] | Set the global world spawn point. | World / Time / Weather |
| /gamerule keepInventory true | Keep your items and XP when you die. | Game Rules |
| /gamerule doDaylightCycle false | Freeze the day/night cycle (stops time). | Game Rules |
| /gamerule doWeatherCycle false | Stop weather from changing on its own. | Game Rules |
| /gamerule mobGriefing false | Stop mobs altering blocks (creeper craters, endermen, etc.). | Game Rules |
| /gamerule doMobSpawning false | Turn off natural mob spawning. | Game Rules |
| /gamerule doImmediateRespawn true | Skip the death screen and respawn instantly. | Game Rules |
| /gamerule randomTickSpeed [n] | Crop growth / fire spread / leaf decay speed (default 3). | Game Rules |
| /tp [target] [destination] | Teleport to an entity or player (alias /teleport). | Teleport |
| /tp [x] [y] [z] | Teleport to coordinates — e.g. /tp 100 64 -200 or /tp ~ ~10 ~. | Teleport |
| /tp [targets] [x] [y] [z] [yaw] [pitch] | Teleport a target to coordinates with optional facing. | Teleport |
| /summon [entity] [pos] [nbt] | Spawn an entity — e.g. /summon minecraft:zombie ~ ~ ~ {IsBaby:true}. | Spawn / Blocks |
| /setblock [pos] [block] [destroy/keep/replace] | Place a single block — e.g. /setblock ~ ~1 ~ minecraft:chest[facing=east]. | Spawn / Blocks |
| /fill [from] [to] [block] [mode] [replace filter] | Fill a cuboid region with a block. | Spawn / Blocks |
| /clone [begin] [end] [destination] [mode] | Copy a region of blocks to a new location. | Spawn / Blocks |
| /op [targets] | Grant operator status. | Admin / Server (multiplayer) |
| /deop [targets] | Revoke operator status. | Admin / Server (multiplayer) |
| /kick [targets] [reason] | Disconnect a player. | Admin / Server (multiplayer) |
| /ban [targets] [reason] | Ban a player (and /pardon to unban). Java only. | Admin / Server (multiplayer) |
| /whitelist [add/remove] [targets] | Add or remove a player from the whitelist. | Admin / Server (multiplayer) |
| /say [message] | Broadcast a message to everyone. | Admin / Server (multiplayer) |
| /seed | Show the world seed. | Info / Find |
| /locate structure [structure] | Find the nearest structure — e.g. /locate structure minecraft:village_plains. | Info / Find |
| /locate biome [biome] | Find the nearest biome. | Info / Find |
| /tellraw [targets] [json] | Send a formatted message — e.g. /tellraw @a {"text":"Hi","color":"green"}. | Info / Find |
| /title [targets] title [json] | Show big centered title text (subtitle/actionbar also). | Info / Find |
Every ID works with /give @p [id] [count] — e.g. /give @p minecraft:diamond_sword. Type to filter, hit Copy, paste after /give. The minecraft: prefix is optional in-game (included here for clean copy-paste). The items players give most:
| ID | Item | Category |
|---|---|---|
| minecraft:diamond_sword | Diamond Sword | Tools & Weapons |
| minecraft:netherite_sword | Netherite Sword | Tools & Weapons |
| minecraft:diamond_pickaxe | Diamond Pickaxe | Tools & Weapons |
| minecraft:netherite_pickaxe | Netherite Pickaxe | Tools & Weapons |
| minecraft:diamond_axe | Diamond Axe | Tools & Weapons |
| minecraft:netherite_axe | Netherite Axe | Tools & Weapons |
| minecraft:diamond_shovel | Diamond Shovel | Tools & Weapons |
| minecraft:netherite_shovel | Netherite Shovel | Tools & Weapons |
| minecraft:diamond_hoe | Diamond Hoe | Tools & Weapons |
| minecraft:netherite_hoe | Netherite Hoe | Tools & Weapons |
| minecraft:mace | Mace (1.21+) | Tools & Weapons |
| minecraft:bow | Bow | Tools & Weapons |
| minecraft:crossbow | Crossbow | Tools & Weapons |
| minecraft:trident | Trident | Tools & Weapons |
| minecraft:shield | Shield | Tools & Weapons |
| minecraft:flint_and_steel | Flint and Steel | Tools & Weapons |
| minecraft:shears | Shears | Tools & Weapons |
| minecraft:fishing_rod | Fishing Rod | Tools & Weapons |
| minecraft:elytra | Elytra | Tools & Weapons |
| minecraft:diamond_helmet | Diamond Helmet | Armor |
| minecraft:diamond_chestplate | Diamond Chestplate | Armor |
| minecraft:diamond_leggings | Diamond Leggings | Armor |
| minecraft:diamond_boots | Diamond Boots | Armor |
| minecraft:netherite_helmet | Netherite Helmet | Armor |
| minecraft:netherite_chestplate | Netherite Chestplate | Armor |
| minecraft:netherite_leggings | Netherite Leggings | Armor |
| minecraft:netherite_boots | Netherite Boots | Armor |
| minecraft:turtle_helmet | Turtle Shell | Armor |
| minecraft:diamond_horse_armor | Diamond Horse Armor | Armor |
| minecraft:golden_horse_armor | Golden Horse Armor | Armor |
| minecraft:iron_horse_armor | Iron Horse Armor | Armor |
| minecraft:leather_horse_armor | Leather Horse Armor | Armor |
| minecraft:diamond | Diamond | Valuables & Materials |
| minecraft:netherite_ingot | Netherite Ingot | Valuables & Materials |
| minecraft:netherite_scrap | Netherite Scrap | Valuables & Materials |
| minecraft:ancient_debris | Ancient Debris | Valuables & Materials |
| minecraft:emerald | Emerald | Valuables & Materials |
| minecraft:gold_ingot | Gold Ingot | Valuables & Materials |
| minecraft:iron_ingot | Iron Ingot | Valuables & Materials |
| minecraft:copper_ingot | Copper Ingot | Valuables & Materials |
| minecraft:nether_star | Nether Star | Valuables & Materials |
| minecraft:totem_of_undying | Totem of Undying | Valuables & Materials |
| minecraft:heart_of_the_sea | Heart of the Sea | Valuables & Materials |
| minecraft:nautilus_shell | Nautilus Shell | Valuables & Materials |
| minecraft:echo_shard | Echo Shard | Valuables & Materials |
| minecraft:amethyst_shard | Amethyst Shard | Valuables & Materials |
| minecraft:obsidian | Obsidian | Blocks & Building |
| minecraft:crafting_table | Crafting Table | Blocks & Building |
| minecraft:furnace | Furnace | Blocks & Building |
| minecraft:chest | Chest | Blocks & Building |
| minecraft:ender_chest | Ender Chest | Blocks & Building |
| minecraft:shulker_box | Shulker Box | Blocks & Building |
| minecraft:anvil | Anvil | Blocks & Building |
| minecraft:enchanting_table | Enchanting Table | Blocks & Building |
| minecraft:beacon | Beacon | Blocks & Building |
| minecraft:tnt | TNT | Blocks & Building |
| minecraft:bookshelf | Bookshelf | Blocks & Building |
| minecraft:glass | Glass | Blocks & Building |
| minecraft:scaffolding | Scaffolding | Blocks & Building |
| minecraft:redstone | Redstone Dust | Redstone |
| minecraft:redstone_block | Block of Redstone | Redstone |
| minecraft:repeater | Redstone Repeater | Redstone |
| minecraft:comparator | Redstone Comparator | Redstone |
| minecraft:piston | Piston | Redstone |
| minecraft:sticky_piston | Sticky Piston | Redstone |
| minecraft:observer | Observer | Redstone |
| minecraft:hopper | Hopper | Redstone |
| minecraft:dropper | Dropper | Redstone |
| minecraft:dispenser | Dispenser | Redstone |
| minecraft:lever | Lever | Redstone |
| minecraft:target | Target Block | Redstone |
| minecraft:golden_apple | Golden Apple | Food |
| minecraft:enchanted_golden_apple | Enchanted Golden Apple | Food |
| minecraft:golden_carrot | Golden Carrot | Food |
| minecraft:cooked_beef | Steak | Food |
| minecraft:bread | Bread | Food |
| minecraft:cake | Cake | Food |
| minecraft:potion | Potion | Brewing & Potions |
| minecraft:splash_potion | Splash Potion | Brewing & Potions |
| minecraft:lingering_potion | Lingering Potion | Brewing & Potions |
| minecraft:experience_bottle | Bottle o' Enchanting | Brewing & Potions |
| minecraft:blaze_powder | Blaze Powder | Brewing & Potions |
| minecraft:nether_wart | Nether Wart | Brewing & Potions |
| minecraft:glowstone_dust | Glowstone Dust | Brewing & Potions |
| minecraft:dragon_breath | Dragon's Breath | Brewing & Potions |
| minecraft:fermented_spider_eye | Fermented Spider Eye | Brewing & Potions |
| minecraft:ender_pearl | Ender Pearl | Utility & Misc |
| minecraft:ender_eye | Eye of Ender | Utility & Misc |
| minecraft:name_tag | Name Tag | Utility & Misc |
| minecraft:lead | Lead | Utility & Misc |
| minecraft:saddle | Saddle | Utility & Misc |
| minecraft:spyglass | Spyglass | Utility & Misc |
| minecraft:bucket | Empty Bucket | Utility & Misc |
| minecraft:water_bucket | Water Bucket | Utility & Misc |
| minecraft:lava_bucket | Lava Bucket | Utility & Misc |
| minecraft:milk_bucket | Milk Bucket | Utility & Misc |
| minecraft:firework_rocket | Firework Rocket | Utility & Misc |
| minecraft:map | Empty Map | Utility & Misc |
| minecraft:compass | Compass | Utility & Misc |
| minecraft:clock | Clock | Utility & Misc |
| minecraft:book | Book | Utility & Misc |
| minecraft:writable_book | Book and Quill | Utility & Misc |
| minecraft:bundle | Bundle | Utility & Misc |
| minecraft:villager_spawn_egg | Villager Spawn Egg | Spawn Eggs |
| minecraft:iron_golem_spawn_egg | Iron Golem Spawn Egg | Spawn Eggs |
| minecraft:wolf_spawn_egg | Wolf Spawn Egg | Spawn Eggs |
| minecraft:horse_spawn_egg | Horse Spawn Egg | Spawn Eggs |
| minecraft:cow_spawn_egg | Cow Spawn Egg | Spawn Eggs |
| minecraft:sheep_spawn_egg | Sheep Spawn Egg | Spawn Eggs |
| minecraft:chicken_spawn_egg | Chicken Spawn Egg | Spawn Eggs |
| minecraft:pig_spawn_egg | Pig Spawn Egg | Spawn Eggs |
| minecraft:creeper_spawn_egg | Creeper Spawn Egg | Spawn Eggs |
| minecraft:zombie_spawn_egg | Zombie Spawn Egg | Spawn Eggs |
| minecraft:skeleton_spawn_egg | Skeleton Spawn Egg | Spawn Eggs |
| minecraft:enderman_spawn_egg | Enderman Spawn Egg | Spawn Eggs |
| minecraft:blaze_spawn_egg | Blaze Spawn Egg | Spawn Eggs |
| minecraft:slime_spawn_egg | Slime Spawn Egg | Spawn Eggs |
| minecraft:axolotl_spawn_egg | Axolotl Spawn Egg | Spawn Eggs |
| minecraft:allay_spawn_egg | Allay Spawn Egg | Spawn Eggs |
| minecraft:fox_spawn_egg | Fox Spawn Egg | Spawn Eggs |
| minecraft:panda_spawn_egg | Panda Spawn Egg | Spawn Eggs |
| minecraft:bee_spawn_egg | Bee Spawn Egg | Spawn Eggs |
| minecraft:sniffer_spawn_egg | Sniffer Spawn Egg | Spawn Eggs |
| minecraft:frog_spawn_egg | Frog Spawn Egg | Spawn Eggs |
| minecraft:camel_spawn_egg | Camel Spawn Egg | Spawn Eggs |
| minecraft:armadillo_spawn_egg | Armadillo Spawn Egg | Spawn Eggs |
Since 1.20.5, enchantments and custom data use [components] in square brackets after the ID — e.g. minecraft:diamond_sword[enchantments={"minecraft:sharpness":5}]. Old {NBT} syntax from 1.20.4 and earlier won't work in 1.21.x. Potions are one base ID plus a potion_contents component, not separate IDs.
/gamerule keepInventory true — you keep your items and XP when you die. (On the newest snapshots it's /gamerule keep_inventory true.)/give [player] [item] [count] — e.g. /give @p minecraft:netherite_pickaxe. Since 1.20.5, enchantments/data use square-bracket [components]./tp [x] [y] [z] for coordinates (~ means relative to you), or /tp [player] to jump to someone. /teleport is the same command.Console open? Here's the rest of the toolkit.