All commands
🏷️
Advanced

/tag

Attach invisible labels to entities to target them later.

Try in Simulator

At a glance

Syntax

Syntax
/tag <target> add <name>
commandtargetcoordsvaluerequiredoptional

See it

What it does

/
Command executed

Anatomy

Every part, explained

  1. 1
    /tagCommandRequired

    Adds or removes entity tags.

  2. 2
    <target>TargetRequired

    Which entity gets the tag.

  3. 3
    addActionRequired

    Use add, remove, or list.

  4. 4
    <name>Tag nameRequired

    The custom tag to apply.

Your turn

Try it yourself

Playground
4 tokens · press Enter to run

Copy & paste

Examples

/tag @s add winner

Tag yourself as winner.

/tag @e[type=zombie] add boss

Tag all zombies as boss.

/tag @s remove winner

Remove the winner tag.

Avoid these

Common mistakes

/tag add winner @s
/tag @s add winner

The target comes before the action.

/tag @s winner
/tag @s add winner

You must say add or remove.

Keep going

Related commands