Gamemode command generator

Change a player's game mode: survival, creative, adventure, or spectator

How to use the Gamemode command generator

  1. Choose the edition and version that match your game
  2. Pick the game mode you want
  3. Specify a target, or leave it blank to change your own mode
  4. Copy the command and run it in Minecraft

Worked examples

The examples below come out of the same generator as the form above, so the commands and explanations always match what the tool produces. Copy one and adjust it from there

1. Switch yourself to creative

Leaving the target empty applies it to whoever typed the command — by far the most common use

/gamemode creative

What it does Will change the game mode of yourself to creative.

2. Put everyone into survival

Run it when a minigame starts, so nobody is left in creative from the previous round

/gamemode survival @a

What it does Will change the game mode of all players to survival.

3. Switch to spectator

Spectator suits players who are already out — they can watch without interfering with the ones still playing

/gamemode spectator @s

What it does Will change the game mode of themselves (whoever runs the command) to spectator.

How this command differs by edition and version

This is the first example above, run through every edition and version this tool supports. Versions that produce the same result share a row

Every version this tool supports produces the same result, so a command you copy works without version-specific edits

Java Edition 1.21.5 and up Java Edition 1.20.5 - 1.21.4 Java Edition 1.13 - 1.20.4 (legacy NBT) Bedrock Edition (stable)
/gamemode creative

Before you use these