Minecraft Command Generator

Build /give, /summon and /execute commands visually. Configure items with enchantments, summon entities with custom NBT, and chain execute conditions.

Java Edition 26.2Updated

Generated Command

/give @p minecraft:diamond_sword 1

Embed This Tool

Put the command generator on your own site or server wiki.
<iframe src="https://tools.astroworldmc.com/embed/command-generator" width="700" height="650" frameborder="0" style="border:none;border-radius:12px;" loading="lazy" title="Command Generator"></iframe>
Live Preview

How to build a give or summon command

  1. Pick the command

    Give, summon and execute each open their own set of fields rather than one shared form.

  2. Choose the version

    Items are written differently in 1.21.5 and up, in 1.20.5 to 1.21.4 and in 1.20.4 and older, and the output follows the version you pick.

  3. Fill in the details

    Item id, count, custom name, lore lines and enchantments for give, or entity type, position and health for summon.

  4. Copy the line

    The generated command is a complete line, ready for chat, a command block or a function file.

How It Works

Build complex /give, /summon and /execute commands.

Java Edition 26.2Checked on against 43 enchantment ids and 41 entity idsPage updated

How to Use the Command Generator

Minecraft commands are typed into the chat window or placed inside command blocks to control gameplay. The /give command lets you spawn items with custom enchantments, names and lore text. The /summon command creates entities at any position with NBT data like custom names, health values and AI toggles. The /execute command is the most powerful, chaining conditions such as "as", "at", "if entity" and "unless entity" before running a final sub-command.

This tool writes the form that belongs to the version you pick above the fields, for Java Edition 1.13 and later. A custom name travels as a JSON string up to 1.21.4 and as SNBT from 1.21.5 on, so /give and /summon both change shape when you move that button. Select a command type at the top, fill in the fields, and the complete command appears at the bottom. Click Copy to place it on your clipboard, then paste it into your game chat, a command block, or a plugin config file. The /particle command carries fields that none of these three have, the spread deltas and the count, so it has its own builder in the particle command builder.

Common Use Cases

Server administrators use /give to create custom kit items with specific enchantments and lore for reward crates or shop systems. Map makers rely on /summon to spawn pre-configured mobs with custom health, names and equipment for boss fights and NPC encounters. The /execute command powers conditional logic in data packs, letting you detect when a player stands on a certain block, is near a specific entity, or is in a particular dimension before triggering effects.

Building commands by hand is error-prone because of the strict NBT syntax Minecraft requires. This generator handles the curly braces, quotes and data type suffixes for you so the command works on the first try. The IDs that go into those commands are listed in the block and item database, and the levels an enchantment really allows are in the enchantment lookup, so a give does not fail on a name or a level the game does not know.

Command syntax this builder follows

Target selectors@p nearest player, @r random player, @a every player, @e every entity, @s whoever is running the command.
Selector argumentstype, distance, limit, sort, tag, scores, nbt, gamemode and level, written in square brackets after the selector.
Item dataSince 1.20.5 an item carries components in square brackets instead of one NBT tag, so a give command copied from an older guide will not parse.
executeas swaps who is running the command, at swaps the position and rotation it runs from. run has to be the last subcommand.
Chat limitA command typed in chat stops at 256 characters. Anything longer belongs in a command block.
Command blocksimpulse fires once per pulse, chain fires after the block pointing into it, repeat fires every tick. Conditional means the block before it has to have succeeded.

The 43 enchantment ids and the 41 entity ids in these dropdowns were laid next to the enchantment files and the entity names version 26.2 ships with, on 8 August 2026. Every one of them exists there, and all 43 enchantments the game ships with are now offered here.

Frequently Asked Questions

Questions about commands
  • Why did my give command stop working after an update?

    Version 1.20.5 replaced item NBT with item components. The old curly brace tag is not read any more, so every give command written before that has to be rebuilt with the component form in square brackets. The builder above writes that component form, and because the shape changed a second time in 1.21.5, when the levels layer left enchantments and text moved to SNBT, there is a version button for each of the three: 1.21.5 and up, 1.20.5 to 1.21.4, and the old curly brace tag for 1.20.4 and older.

  • What is the difference between as and at in execute?

    as changes whose command it is, at changes where it happens. execute as @a run say hi makes the line come from each player while it still runs at the position the command was issued from, while execute at @a run summon spawns at every player without changing who runs the command.

  • Why does @p pick the wrong player?

    @p means nearest to the point the command runs from. In a command block that point is the block, not you, so the nearest player is whoever stands closest to the block.

  • My command is too long for chat. Now what?

    Put it in a command block. Chat cuts off at 256 characters, while a command block holds a command many times that length, which is why anything with a large component payload is built there.

Related Tools

More tools that might help youView All Tools