Web Analytics Made Easy - Statcounter

Tools / Minecraft

Minecraft Target Selector Builder

Pick a base selector and add the arguments you need - type, distance, limit, sort, name, tag, gamemode, level, coordinates - to get a valid @e[...] selector you can drop into /execute, /tp, /kill, or any command. Runs in your browser.

Filters (leave blank to skip)
@e

How to use it

  1. Pick the base: @p nearest player, @a all players, @r random player, @e all entities, @s the command's executor.
  2. Add filters - distances are written as a range (..10, 5.., or 5..10) from the min/max you enter.
  3. Copy the selector into a command, e.g. /execute as <selector> run ... or /kill <selector>.

Tip: @e matches all entities including items and armor stands - set type to narrow it. For "the nearest one of a type", use limit=1, sort=nearest. Syntax is Java Edition.

Writing command-block contraptions on a server?

Selectors are the backbone of redstone-and-command machines on multiplayer servers. The tool is free and needs no account; if you need somewhere to host the world, Supercraft is one option among many.

Frequently asked questions

What are Minecraft target selectors?

They are the @p, @a, @r, @e, and @s shortcuts that pick who or what a command affects, optionally narrowed with arguments in brackets - for example @e[type=zombie,distance=..10,limit=3]. This tool builds that bracketed selector for you.

How do I select the nearest entity of a type?

Use @e with type set to the entity, limit=1, and sort=nearest - e.g. @e[type=minecraft:zombie,limit=1,sort=nearest]. Set the base to @e and pick those arguments here and the tool writes it.

What does distance=..10 mean?

It is a range: ..10 means within 10 blocks, 5.. means at least 5 blocks away, and 5..10 means between 5 and 10. This builder writes the range form from the min and max you enter.

Is this Java Edition?

Yes. The selector argument syntax shown is Java Edition. Bedrock supports most of the same selectors with minor differences.

This tool: v1.10 · updated 18 Sep 2026