Execute Builder
Build complex /execute command chains for Minecraft Java Edition 1.21.11. 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 entitiesCommand Chain
Add subcommands from the palette to build your /execute command
Click any subcommand on the left to get started
run
Generated Command
0 subcommandsTips
as + atUse "as" then "at" to run a command at each entity's location as that entityif/unlessConditions abort the chain if they fail -- "unless" inverts the teststoreStore 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 drag-and-drop reordering.
Quick Steps
- 1Click Add Sub-command to start building your execute chain
- 2Select the sub-command type (as, at, if, positioned, etc.)
- 3Fill in the parameters for each sub-command
- 4Drag and drop to reorder sub-commands in the chain
- 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 editor support all /execute sub-commands for modern versions?
Yes — it's version-aware. Sub-commands added in later versions (on, summon, anchored, facing entity, etc.) only appear when you select a version that supports them. Older syntax like the pre-1.13 /execute form is not supported; this editor targets modern /execute only.