Uses modern Minecraft item component syntax (1.20.5+). On older versions these need the legacy NBT tag format instead.

How to Use the Spawn Egg Generator

  1. Pick a target selector (defaults to @p, the nearest player).
  2. Type an entity ID, e.g. minecraft:zombie.
  3. Optionally type a custom name – the mob it spawns will carry that name, not the egg item itself.
  4. Copy the generated /give command.

Syntax Reference

Spawn egg item IDs follow a predictable <entity>_spawn_egg pattern:

/give @p minecraft:zombie_spawn_egg

To make the egg spawn a mob with a custom name, the name has to attach to the entity that gets created, not the item – that’s the entity_data component, holding NBT that gets copied onto the spawned entity:

/give @p minecraft:zombie_spawn_egg[entity_data={id:"minecraft:zombie",CustomName:'{"text":"Boss Zombie"}'}]

Note the entity ID appears twice – once in the item name (zombie_spawn_egg) and once inside entity_data.id – both need to match the entity you want. CustomName takes a JSON-text string (note the single-quote wrapping around the JSON text is a common way to nest double quotes safely in command syntax).

Frequently Asked Questions

Do spawn eggs exist for every mob in the game?

No – a handful of mobs have no spawn egg at all, mainly bosses and mobs meant to only appear through specific game mechanics, such as the Ender Dragon, Wither, Warden, and the Elder Guardian in some versions. Attempting to /give a nonexistent spawn egg ID will fail; those mobs are normally summoned with /summon instead.

Does the custom name make the spawned mob a “named” mob that won’t despawn?

Yes for most passive/hostile mobs – a custom name generally prevents natural despawning, the same behavior as naming a mob with a name tag in survival. This can matter if you’re placing a named mob in a build and don’t want it disappearing over time from despawn rules.

Can I set other entity properties besides a custom name through entity_data?

Yes – entity_data accepts the full range of that entity’s NBT tags, so things like Health, NoAI, Invulnerable, equipment, or passenger data can all be added inside the same object alongside CustomName. This generator’s UI only exposes the name field for simplicity.

Where do spawn eggs normally come from in survival?

Nowhere naturally – spawn eggs aren’t found as loot or crafted in vanilla survival at all; they’re strictly a creative-mode and command-based tool for players and map makers, reached via the creative inventory or /give like this generator produces.

Related Tools