Updated:

New worlds

On the Create New World screen, set Allow Cheats to ON. That world then accepts commands any time.

Existing worlds

  1. Join the world and press Esc.
  2. Choose Open to LAN.
  3. Set Allow Cheats to ON and press Start LAN World.

This lasts until you close the world, so repeat it each time you play. The world is open to your local network meanwhile, which does not matter if nobody joins.

Open chat and type

KeyWhat it does
TOpens chat
/Opens chat with the slash already typed
TabCompletes commands and player names
Up / DownBrings back earlier commands
Ctrl + VPastes a copied command

While you type, the game suggests what comes next and turns mistakes red. Commands from our generators can be copied and pasted straight in.

The 256 character limit

Chat accepts at most 256 characters. A /give with many names and enchantments can go over. Use a command block instead, which holds much longer commands.

/give @s minecraft:command_block

Place it, right-click, paste the command and press Done. Set it to Always Active or add a button to run it (see the command block guide). Only operators in creative mode can edit command blocks.

On a server

Do cheats affect advancements?

On Java you still earn advancements with cheats on; unlike Bedrock, nothing gets locked. The world list does show the world as using cheats.

Common problems

Common questions

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.