Vivian’s Minecraft ToolsSMALL TOOLS. BIG ADVENTURES.
MINECRAFT JAVA EDITION

How to use summon (Java Edition)

Spawn an entity at a position and optionally configure its name, equipment, or entity-specific settings.

Basic syntax

/summon <entity> [<x> <y> <z> [<nbt>]]

Arguments in <…> are required, and arguments in […] are optional. Supply coordinates before any NBT.

ArgumentMeaning
entityThe ID of the entity to spawn. For example, minecraft:pig is a pig.
x y zWith no coordinates, the entity spawns at the execution position. ~ ~ ~2 offsets the position by two blocks along the Z axis.
nbtAn SNBT compound {…} sets the name, behavior, or other properties. Available tags depend on the entity and version.

Minecraft official guide to commands

Examples

Spawn a pig two blocks away along Z

/summon minecraft:pig ~ ~ ~2 Open these settings in the generator →

Spawn a baby zombie with its AI disabled

/summon minecraft:zombie ~ ~ ~2 {IsBaby:1b,NoAI:1b} Open these settings in the generator →

Create a villager trade

List trades in Offers.Recipes. Each trade has a buy payment, a sell result, and an optional second payment in buyB.

Select Villager in the generator to add or remove trades, search for items, and set their counts or the maximum number of uses.

Spawn a librarian who sells a bookshelf for three emeralds

/summon minecraft:villager ~ ~ ~2 {VillagerData:{type:"minecraft:plains",profession:"minecraft:librarian",level:1},Offers:{Recipes:[{buy:{id:"minecraft:emerald",count:3},sell:{id:"minecraft:bookshelf"},maxUses:12}]}} Open these settings in the generator →

Version differences for names and equipment

In Java 1.21.5 and later, write the text component directly, as in CustomName:{text:"Scout"}. In 1.21.4 and earlier it is a JSON string.

The same update consolidated HandItems and ArmorItems into equipment. The generator uses the format for the selected release.

Minecraft Java 1.21.5 release notes

Make your own command

Open generator →
Ad space (preview)