Tag Command Generator

Attach a tag to a player or entity, for filtering later with @e[tag=...]

Can also be used with entities, e.g. @e[type=zombie]

Only a-z A-Z 0-9 _ - . + are allowed — no spaces.

What Tag is used for

A tag is an invisible label in the game, used to "mark" a player or entity so the system can tell them apart — for example, tagging boss onto a single zombie, then targeting just that one with @e[tag=boss]

  1. Add the tag with /tag @e[type=zombie,limit=1] add boss
  2. Use it later in the Execute command, e.g. execute as @e[tag=boss] run ...
  3. Remove the tag once you no longer need it, so conditions do not stay stuck.

A single entity can hold multiple tags at once, and a tag stays until it is removed or the entity disappears.

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. Add a tag to a player

A tag is an invisible label you can filter on later, e.g. @a[tag=boss] inside another command

/tag @p add boss

What it does Will add the tag "boss" to the nearest player — you can then select this group with @e[tag=boss].

2. Remove a tag

Tags stay until you delete them — they do not clear themselves at the end of a round

/tag @a remove boss

What it does Will remove the tag "boss" from all players.

3. List the tags on a target

Handy while debugging, when a tag-filtered command is not matching who you expected

/tag @s list

What it does Will list all the tags themselves (whoever runs the command) currently has.

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)
/tag @p add boss

Before you use these