Minecraft Target Selector Generator

Say exactly who a command acts on. Pick a starting point, add filters, and the tool tells you in plain words about any combination the game would refuse.

Entity type
Only on @e or @s. The other bases already mean players.
Name
Tag
A label you set yourself with /tag.
Team
Distance
to
In blocks. Leave one side empty for an open end.
Experience level
to
Players only. Leave one side empty for an open end.
Your selector
@e[type=zombie,distance=..20]

Drop it into any command that takes a target, in place of the @p or @a you would normally type.

An example, in a command
/kill @e[type=zombie,distance=..20]

Replace /kill with whatever you actually want to run.

How it works

  • Choose what to start from. @e is every entity, @a is every player.
  • Add filters. Leave a box empty and that filter is left out.
  • Use the not button to match everything except what you typed.
  • Read any note that appears. The game answers a bad combination by pointing at a character position, which does not tell you what is wrong.
  • Copy the selector into any command that takes a target, such as the tellraw or title builders.

Nothing is sent anywhere. The selector is built in your browser.

Questions

What is a target selector?
The part of a command that says who it acts on. Instead of naming a player you write a short expression, so one command can hit every zombie within twenty blocks, or the nearest player in creative mode.
Why does @a[type=zombie] not work?
Because @a already means players, so filtering it by entity type asks for a zombie that is also a player. Use @e, which starts from every entity, and then filter it down.
Why can I not use limit on @s?
@s means whoever ran the command, which is always exactly one thing. There is nothing for a limit or a sort order to do, so the game refuses them rather than ignoring them.
How do the distance boxes work?
Fill both for a band, such as three to eight blocks away. Fill only the first for that far and further. Fill only the second for that far and nearer. Filling both with the same number means exactly that distance.
What does the not button do?
It flips the filter to mean everything except that. So a type of zombie with not turned on matches every entity that is not a zombie.
What is a tag?
A label you attach yourself with the /tag command. It is the usual way to mark a particular mob so later commands can find it again, because nothing else about it is unique.
Where do I put the selector?
Anywhere a command asks who to act on. Replace the @p or @a you would normally type, in /kill, /tp, /give, /effect and the rest.