/tag Command in Minecraft Java Edition

Add, List, and Remove Entity Tags

Java EditionLogic & ScoreboardPermission: Level 2Bedrock version →

The /tag command lets you attach custom text labels to players and other entities in Minecraft Java Edition. You can add new tags, remove existing ones, or check which tags a target currently holds.

Players and map makers use this command to group entities together or mark specific targets for later commands. To run it, you need level 2 operator permissions, which means cheats must be turned on in single-player worlds.

Syntax (Java 26.3, 3 forms)

  1. /tag <targets> add <name>
  2. /tag <targets> list
  3. /tag <targets> remove <name>

The forms you will use most

/tag <targets> add <name>
Attaches a new text tag with the chosen name to the selected targets.
/tag <targets> list
Shows all the tags currently attached to the selected targets.
/tag <targets> remove <name>
Deletes a specific tag from the selected targets.

Arguments

ArgumentTypeWhat it means
<targets>target selectorThe entity or entities you want to modify or check, chosen using a player name, a UUID, or a target selector like @p, @a, @e, or @s.
<name>textThe word or piece of text that acts as the label for the tag you are adding or removing.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

Minecraft Bedrock Edition also includes the /tag command with a nearly identical structure. In Bedrock Edition, the syntax is written as /tag <entity: targets> <action: TagChangeAction> <name: TagValues> for changing tags, and /tag <entity: targets> list for viewing them.

See /tag in Bedrock Edition →

FAQ

What permission level do I need to use the /tag command?

You need permission level 2, which means you must be an operator on a server or have cheats turned on in your single-player world.

When was the /tag command added to Minecraft Java Edition?

The /tag command has been available since at least Java Edition 1.13 and remains in the game through version 26.3.

Can I use /tag on mobs and other entities, or just players?

You can use it on any entity by using a UUID or an entity target selector like @e or @s in the targets argument.

Related commands

/bossbar/data/execute/function/random/return/schedule/scoreboard/team/trigger