Kill command generator

Instantly kill the target player or entity

Example: @s (yourself), @e[type=zombie], or a player name

How to use the Kill command generator

  1. Choose the edition and version that match your game
  2. Specify the target you want to remove
  3. Copy the command and run it in Minecraft

Caution: this command removes the target instantly and cannot be undone. Double-check the target selector before running it for real.

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. Remove every zombie in the world

The type= filter limits it to one kind of mob — much safer than a bare @e, which would include players

/kill @e[type=zombie]

What it does Will kill entities matching the condition (with extra conditions) immediately. This action cannot be undone.

2. Clean up dropped items

Loose items on the ground weigh a server down, so this is often set to run on a timer

/kill @e[type=item]

What it does Will kill entities matching the condition (with extra conditions) immediately. This action cannot be undone.

3. Kill yourself

A quick way back to spawn when you are stuck in a hole or lost in a cave

/kill @s

What it does Will kill themselves (whoever runs the command) immediately. This action cannot be undone.

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)
/kill @e[type=zombie]

Before you use these