/kill Command Generator
BetaPick a target — every zombie, every mob but players, dropped items — and copy the command. The preview shows who in the scene the selector hits.
Describe it — AI writes the command
Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.
Checking the AI…
Paste a command— edit it here or move it to another version
Leave the target empty to kill the player running the command. @e includes players unless you add type=!player.
Your command · Java 26.3
21 characters/kill @e[type=zombie]
Raw editor
How it works
/kill takes one optional target. Leave it out and it kills whoever runs the command. The syntax is the same in every Java and Bedrock version; what you pick with is the target selector.
Common targets
kill @e[type=zombie] kill @e[type=!player] kill @e[type=item] kill @e[type=!player,distance=..20]
@e on its own matches players too, so kill @e kills everyone in the world — the generator warns about it. Add type=!player to spare them.
FAQ
How do I kill all mobs but not players?
Use kill @e[type=!player]. Note this also removes item frames, armor stands, paintings and dropped items — narrow it with more type= arguments if you want to keep them.
How do I clear dropped items?
kill @e[type=item] removes every item lying on the ground (in loaded chunks).
Why did /kill @e kill me?
@e selects every entity, and players are entities. Add type=!player.
Does /kill work on Bedrock?
Yes, with the same shape: kill @e[type=zombie]. Bedrock selectors use the same type= argument.
Can I kill mobs in creative without them dropping loot?
No — killed mobs drop loot and experience as usual (unless doMobLoot is off). To remove them without drops, teleport them into the void: tp @e[type=zombie] ~ -1000 ~.