(Image credit: Mojang)
Minecraft update: What’s new?
Minecraft skins: New looks
Minecraft mods: Beyond vanilla
Minecraft shaders: Spotlight
Minecraft seeds: Fresh new worlds
Minecraft texture packs: Pixelated
Minecraft servers: Online worlds
Minecraft commands: All cheats
There’s no shame in using Minecraft commands and cheats to customize your experience just how you like it. A sandbox should be yours to play in. If you want an enchanted sword hanging on your wall, or you want creepers to stop wandering out of the woods and exploding the treehouse you’re working on, or a friend on your server wandered way too far from spawn and needs a handy teleport back home—Minecraft commands can help.
Like everything else in Minecraft, using commands has only gotten easier in recent versions of the game. Instead of looking up item ID tables or enchanting lists, the game will now helpfully give you a list of options while you’re typing.
We’ve collected some of the commands you’re likely to use most up at the top in the best Minecraft commands section. Think teleporting yourself, adding experience points, or giving yourself an item you just cannot find out in the wild. There are even more commands than we have listed here including a bunch of specific game rule setting adjustments. This list has all the commands you’re most likely to need.
Best Minecraft commands
(Image credit: Mojang)
Add levels and experience
/experience add @s 10 levels
This will give you 10 levels, a handy shortcut for enchanting items. You can also use /experience add @s 10 points to add only a certain number of xp instead of full levels. Try other targets with @ to give experience or levels to another player.
Teleport command
/teleport or /tp
You can use this command as /tp x y z with a set of coordinates to take you anywhere you like or use shorthand targets to teleport other players or mobs to you.
Give item command
/give @s minecraft:diamond 10
This will give you 10 diamonds, but the “give” command can be used with lots of items and amounts. Pay attention to the autofill options to give yourself any item you want, from a diamond sword to a saddle to an enderpearl.
Change difficulty
/difficulty peaceful
Changes the difficulty settings of your world. You can also set it to easy, hard, or normal. If you want mobs to stop attacking you, peaceful mode is the way to go.
Change game mode
/gamemode creative
Separate from difficulty, this changes your game mode. You can also set it to adventure, spectator, or survival. If you want to know how to fly in Minecraft, double jump while in creative mode.
Keep inventory when you die
/gamerule keepInventory true
Setting keepInventory to “true” means you won’t drop your inventory on the ground where you die and will respawn with everything instead. Using /gamerule keepInventory false will go back to the default setting.
No fall damage
/gamerule fallDamage false
As it sounds, turning off fall damage means you won’t lose hearts when falling from heights. You can set this rule to “true” to go back to the normal setting.
Stop mob griefing
/gamerule mobGriefing false
Turning off mob griefing means that enemies like creepers and ghasts won’t be able to destroy blocks. It will also stop endermen from snatching blocks and carrying them off. If you’re struggling with ghasts exploding your Nether builds, this is how to make them cut it out. They’ll still be able to hurt you with fireballs, but at least they won’t blow up all the netherrack you’re standing on.
Change time
/time set day
This will set the current time to morning. You can also set the time to “night” or use numbers between 0-24000. For reference, 0 is sunrise and 13000 is sunset.
Minecraft command targets
Below are the shorthand codes to save you from typing in different player names. These are worth memorizing so you don’t have to type in names like “Sniper_Kitty_Bruv_91” every time some jobber joins your game.
@p – the player nearest to you@r – a random player@a – all players@e – all entities in the world.@s – yourself
Minecraft commands list
(Image credit: Mojang)
Minecraft commands list
CommandWhat it does/alwaysday or /daylock(Bedrock only) These two commands will make it so night never falls in your world./gamerule doDaylightCycle false(Java) This is the always daytime command equivalent for Java version./clone x1 y1 z1 x2 y2 z2Use this command with two sets of coordinates to clone a particular selection of blocks to a new location. This is useful for duplicating structures or other builds you’ve created./effectThe /effect command can be used for a lot of things. For instance “/effect give @s minecraft:night_vision 180” will give you night vision for three minutes, useful for exploring caves without a torch./enchantThe enchant command can be used on any enchantable item you’re holding. Use “/enchant @s minecraft:unbreaking” to make whichever tool you’re holding unbreakable./fill x y z x y z [block]Fills an area with a specified type of block. Make use of the autocomplete suggestions to search for the blocks you want. Useful for creating a river by filling an area with water or excavating by filling with air./gameruleThere are specific gamerule commands on this list we find useful, but be aware there are many others you can try by typing this in and scrolling through the options./killBy default, the /kill command will kill everything, including you, so be specific! Using the @e target will allow you to specify a specific mob type with “/kill @e[type=mobType]”. Kill all the spiders perhaps?/locateThe locate command will tell you the coordinates of the nearest specified biome, structure, or point of interest. You can then use the /tp command to go there! Try searching for the nearest witch hut or blacksmith./meType anything you want after this to print the words in chat as if you’re said them./placeThis command can get complex, but it will allow you to place lots of different structures. You can also specify coordinates at the end of this command to tell the game where exactly to place things./ride(Bedrock only) This command will let you summon an animal to ride. Currently you can only use animals that are ride-able such as “/ride @s summonn_ride horse” otherwise the creature will be summoned near you, but not rideable./seedThis command will show you your world seed in chat, which you can then click on to copy. Handy if you want to share a world seed with a friend!/setblock x y z [block]This command turns a block at specific coordinates into a different one, a bit like the /fill command./setworldspawnBy default, this will change the world spawn point to your current location. You can also use /setworldspawn x y z to specify a location instead./spawnpointUnlike world spawn, this sets the respawn point for a specified player when they die./summonThe /summon command can be used to call forth any mob you like. Try “/summon minecraft:enderman” to summon an Enderman at your location./toggledownfall(Bedrock only) This command will make it rain or snow. It will also make precipitation stop./weather(Java) This command will let you set the current weather to rain, clear, or thunder.
How to use Minecraft commands
How to turn on cheats in Minecraft
Some of these commands can be used any time you play Minecraft, but others require you to turn cheats on. You’ll do this when creating your world initially, either by setting “Allow Cheats: On” in the world creation menu or by selecting Creative Mode, which automatically allows cheats.
How to use Minecraft commands
(Image credit: Rockstar Games)
Fallout 4 cheats: Nuclear codes
Minecraft commands: Unblocked
RDR2 cheats: Most wanted
GTA 5 cheats: Phone it in
Sims 4 cheats: Life hacks
Ark cheats: Expedited evolution
Press “T” to open the Minecraft command line, which is where you can type any of the following cheats. You can also press the / key to open the commands box with the / before each one already included for you.
When typing in many of these commands, Minecraft will now attempt to autocomplete for you, so pay attention to the options! Either type out one of the suggestions or use your arrow keys to select from the list above your chat box and the “tab” key to insert it.
Some commands like /locate will help by suggesting options to help you put together a long command like “/locate biome minecraftsunflower_plains” that you likely won’t have memorized. This makes commands like “/gamemode” and “/difficulty” easier to fire off quickly.