Home/ Guides/ Minecraft Commands
⛏️ Minecraft · Commands

Minecraft Commands

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.

Verified vs. the official Minecraft Wiki · Java Edition 1.21.x · June 2026
Open the console
Open chat and type / commands in a Creative or cheats-on world. In Survival, use Open to LAN → Allow Cheats: On to switch them on.
Full command list ↓ — 38 commands, searchable, one-tap copy.
🔛

How to Enable Commands & Cheats in Minecraft

1

Open chat with T (or /) and type a command — they all start with a slash.

2

Commands need cheats on: play in Creative, make a world with Allow Cheats: On, or be a server operator.

3

Survival cheat trick: pause → Open to LAN → set Allow Cheats: On → Start LAN World. Cheats work for that session — nobody else needs to join.

Target selectors fill in for player names: @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).
⌨️

Minecraft Command List

Type to filter, hit Copy, paste in-game. 38 commands. Placeholders in [brackets] are values you fill in.

CommandWhat it doesCategory
/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 trueKeep your items and XP when you die.Game Rules
/gamerule doDaylightCycle falseFreeze the day/night cycle (stops time).Game Rules
/gamerule doWeatherCycle falseStop weather from changing on its own.Game Rules
/gamerule mobGriefing falseStop mobs altering blocks (creeper craters, endermen, etc.).Game Rules
/gamerule doMobSpawning falseTurn off natural mob spawning.Game Rules
/gamerule doImmediateRespawn trueSkip 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)
/seedShow 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
🧬

Minecraft /give Item ID List

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:

IDItemCategory
minecraft:diamond_swordDiamond SwordTools & Weapons
minecraft:netherite_swordNetherite SwordTools & Weapons
minecraft:diamond_pickaxeDiamond PickaxeTools & Weapons
minecraft:netherite_pickaxeNetherite PickaxeTools & Weapons
minecraft:diamond_axeDiamond AxeTools & Weapons
minecraft:netherite_axeNetherite AxeTools & Weapons
minecraft:diamond_shovelDiamond ShovelTools & Weapons
minecraft:netherite_shovelNetherite ShovelTools & Weapons
minecraft:diamond_hoeDiamond HoeTools & Weapons
minecraft:netherite_hoeNetherite HoeTools & Weapons
minecraft:maceMace (1.21+)Tools & Weapons
minecraft:bowBowTools & Weapons
minecraft:crossbowCrossbowTools & Weapons
minecraft:tridentTridentTools & Weapons
minecraft:shieldShieldTools & Weapons
minecraft:flint_and_steelFlint and SteelTools & Weapons
minecraft:shearsShearsTools & Weapons
minecraft:fishing_rodFishing RodTools & Weapons
minecraft:elytraElytraTools & Weapons
minecraft:diamond_helmetDiamond HelmetArmor
minecraft:diamond_chestplateDiamond ChestplateArmor
minecraft:diamond_leggingsDiamond LeggingsArmor
minecraft:diamond_bootsDiamond BootsArmor
minecraft:netherite_helmetNetherite HelmetArmor
minecraft:netherite_chestplateNetherite ChestplateArmor
minecraft:netherite_leggingsNetherite LeggingsArmor
minecraft:netherite_bootsNetherite BootsArmor
minecraft:turtle_helmetTurtle ShellArmor
minecraft:diamond_horse_armorDiamond Horse ArmorArmor
minecraft:golden_horse_armorGolden Horse ArmorArmor
minecraft:iron_horse_armorIron Horse ArmorArmor
minecraft:leather_horse_armorLeather Horse ArmorArmor
minecraft:diamondDiamondValuables & Materials
minecraft:netherite_ingotNetherite IngotValuables & Materials
minecraft:netherite_scrapNetherite ScrapValuables & Materials
minecraft:ancient_debrisAncient DebrisValuables & Materials
minecraft:emeraldEmeraldValuables & Materials
minecraft:gold_ingotGold IngotValuables & Materials
minecraft:iron_ingotIron IngotValuables & Materials
minecraft:copper_ingotCopper IngotValuables & Materials
minecraft:nether_starNether StarValuables & Materials
minecraft:totem_of_undyingTotem of UndyingValuables & Materials
minecraft:heart_of_the_seaHeart of the SeaValuables & Materials
minecraft:nautilus_shellNautilus ShellValuables & Materials
minecraft:echo_shardEcho ShardValuables & Materials
minecraft:amethyst_shardAmethyst ShardValuables & Materials
minecraft:obsidianObsidianBlocks & Building
minecraft:crafting_tableCrafting TableBlocks & Building
minecraft:furnaceFurnaceBlocks & Building
minecraft:chestChestBlocks & Building
minecraft:ender_chestEnder ChestBlocks & Building
minecraft:shulker_boxShulker BoxBlocks & Building
minecraft:anvilAnvilBlocks & Building
minecraft:enchanting_tableEnchanting TableBlocks & Building
minecraft:beaconBeaconBlocks & Building
minecraft:tntTNTBlocks & Building
minecraft:bookshelfBookshelfBlocks & Building
minecraft:glassGlassBlocks & Building
minecraft:scaffoldingScaffoldingBlocks & Building
minecraft:redstoneRedstone DustRedstone
minecraft:redstone_blockBlock of RedstoneRedstone
minecraft:repeaterRedstone RepeaterRedstone
minecraft:comparatorRedstone ComparatorRedstone
minecraft:pistonPistonRedstone
minecraft:sticky_pistonSticky PistonRedstone
minecraft:observerObserverRedstone
minecraft:hopperHopperRedstone
minecraft:dropperDropperRedstone
minecraft:dispenserDispenserRedstone
minecraft:leverLeverRedstone
minecraft:targetTarget BlockRedstone
minecraft:golden_appleGolden AppleFood
minecraft:enchanted_golden_appleEnchanted Golden AppleFood
minecraft:golden_carrotGolden CarrotFood
minecraft:cooked_beefSteakFood
minecraft:breadBreadFood
minecraft:cakeCakeFood
minecraft:potionPotionBrewing & Potions
minecraft:splash_potionSplash PotionBrewing & Potions
minecraft:lingering_potionLingering PotionBrewing & Potions
minecraft:experience_bottleBottle o' EnchantingBrewing & Potions
minecraft:blaze_powderBlaze PowderBrewing & Potions
minecraft:nether_wartNether WartBrewing & Potions
minecraft:glowstone_dustGlowstone DustBrewing & Potions
minecraft:dragon_breathDragon's BreathBrewing & Potions
minecraft:fermented_spider_eyeFermented Spider EyeBrewing & Potions
minecraft:ender_pearlEnder PearlUtility & Misc
minecraft:ender_eyeEye of EnderUtility & Misc
minecraft:name_tagName TagUtility & Misc
minecraft:leadLeadUtility & Misc
minecraft:saddleSaddleUtility & Misc
minecraft:spyglassSpyglassUtility & Misc
minecraft:bucketEmpty BucketUtility & Misc
minecraft:water_bucketWater BucketUtility & Misc
minecraft:lava_bucketLava BucketUtility & Misc
minecraft:milk_bucketMilk BucketUtility & Misc
minecraft:firework_rocketFirework RocketUtility & Misc
minecraft:mapEmpty MapUtility & Misc
minecraft:compassCompassUtility & Misc
minecraft:clockClockUtility & Misc
minecraft:bookBookUtility & Misc
minecraft:writable_bookBook and QuillUtility & Misc
minecraft:bundleBundleUtility & Misc
minecraft:villager_spawn_eggVillager Spawn EggSpawn Eggs
minecraft:iron_golem_spawn_eggIron Golem Spawn EggSpawn Eggs
minecraft:wolf_spawn_eggWolf Spawn EggSpawn Eggs
minecraft:horse_spawn_eggHorse Spawn EggSpawn Eggs
minecraft:cow_spawn_eggCow Spawn EggSpawn Eggs
minecraft:sheep_spawn_eggSheep Spawn EggSpawn Eggs
minecraft:chicken_spawn_eggChicken Spawn EggSpawn Eggs
minecraft:pig_spawn_eggPig Spawn EggSpawn Eggs
minecraft:creeper_spawn_eggCreeper Spawn EggSpawn Eggs
minecraft:zombie_spawn_eggZombie Spawn EggSpawn Eggs
minecraft:skeleton_spawn_eggSkeleton Spawn EggSpawn Eggs
minecraft:enderman_spawn_eggEnderman Spawn EggSpawn Eggs
minecraft:blaze_spawn_eggBlaze Spawn EggSpawn Eggs
minecraft:slime_spawn_eggSlime Spawn EggSpawn Eggs
minecraft:axolotl_spawn_eggAxolotl Spawn EggSpawn Eggs
minecraft:allay_spawn_eggAllay Spawn EggSpawn Eggs
minecraft:fox_spawn_eggFox Spawn EggSpawn Eggs
minecraft:panda_spawn_eggPanda Spawn EggSpawn Eggs
minecraft:bee_spawn_eggBee Spawn EggSpawn Eggs
minecraft:sniffer_spawn_eggSniffer Spawn EggSpawn Eggs
minecraft:frog_spawn_eggFrog Spawn EggSpawn Eggs
minecraft:camel_spawn_eggCamel Spawn EggSpawn Eggs
minecraft:armadillo_spawn_eggArmadillo Spawn EggSpawn 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.

Minecraft Commands FAQ

How do you turn on cheats in Minecraft?
Play in Creative or a world with Allow Cheats on. To enable cheats in an existing Survival world, pause → Open to LANAllow Cheats: On → Start LAN World (no one else has to join). It lasts for that session.
What's the keep inventory command in Minecraft?
/gamerule keepInventory true — you keep your items and XP when you die. (On the newest snapshots it's /gamerule keep_inventory true.)
How do you give yourself items in Minecraft?
/give [player] [item] [count] — e.g. /give @p minecraft:netherite_pickaxe. Since 1.20.5, enchantments/data use square-bracket [components].
How do you teleport in Minecraft?
/tp [x] [y] [z] for coordinates (~ means relative to you), or /tp [player] to jump to someone. /teleport is the same command.

More from GamesOMG

Console open? Here's the rest of the toolkit.