Skip to content
Generator

Execute Builder

Build complex /execute command chains for Minecraft Java Edition 26.3. Add subcommands from the palette, configure their parameters, and copy the final command. The /execute command lets you run commands with modified execution context -- change the executor, position, conditions, and more.

Chain multiple subcommandsConditional execution (if/unless)Store results in scoreboards & NBT

Subcommand palette

Target selectors

@pNearest player
@aAll players
@rRandom player
@sExecuting entity
@eAll entities
@nNearest entity

Command chain

Add subcommands from the palette to build your /execute command

Click any subcommand on the left to get started

run

Generated command

0 subcommands
/execute ...

Tips

  • as + atUse "as" then "at" to run a command at each entity's location as that entity
  • if/unlessConditions abort the chain if they fail -- "unless" inverts the test
  • storeStore the result or success of the final command into a scoreboard, NBT, or bossbar
  • ~Use tilde for relative coordinates and caret (^) for local coordinates

How to use the Execute Command Builder

Build complex /execute command chains visually by stacking sub-commands. Supports as, at, positioned, if, unless, rotated, facing, in, and run, with buttons to reorder the chain.

Quick steps

  1. 1Click a sub-command in the Subcommand Palette to add it to your chain
  2. 2Select the sub-command type (as, at, if, positioned, etc.)
  3. 3Fill in the parameters for each sub-command
  4. 4Use the move up / move down buttons to reorder sub-commands in the chain
  5. 5Copy the complete /execute command from the output

Example use cases

  • Run a command as every player at their location with /execute as @a at @s run ...
  • Create conditional logic that checks for a block before running a command
  • Target entities within a specific dimension or position range

Tips

The /execute command chains sub-commands left to right — order matters for context
Use if block or if entity sub-commands to add conditions to your chain

Frequently asked questions

How does /execute work in Minecraft?

/execute chains sub-commands (as, at, positioned, if, unless, rotated, facing, in, …) that modify who or where the final command runs. Each sub-command transforms the execution context before passing it to the next. The chain ends with "run <command>" that actually executes with the accumulated context.

What is the difference between "as" and "at" in /execute?

"as <entity>" changes WHO runs the command (changes the @s selector). "at <entity>" changes WHERE it runs from (position, rotation, dimension). A common pattern is "execute as @a at @s run ..." — run the command as each player, at each player's location.

Can I add conditional logic to /execute chains?

Yes — use "if" and "unless" sub-commands. Examples: if block ~ ~-1 ~ minecraft:diamond_block, if entity @e[type=zombie,distance=..10], if score @s kills matches 10..20. The chain halts if the condition fails, so the final run command only fires when all conditions pass.

How do I chain multiple commands in one /execute?

Minecraft only allows one "run" per execute. For multi-step logic, put each execute in a function file and call the function from a command block, or chain command blocks in sequence. You can also use execute run execute run … to nest subcommands but it gets unreadable fast.

Does the builder support newer /execute sub-commands?

Yes, it's version-aware. Sub-commands added in later versions (on, summon and positioned over from 1.19.4, if function from 1.20.3, if items from 1.20.5) only appear when you select a version that has them. Two newer conditions are not in the palette yet: if stopwatch (1.21.11) and if slots (26.3). The pre-1.13 /execute form is not supported; this builder writes modern /execute only.