Minecraft Command Generator

Build /give and /summon commands with names, enchantments, attributes, gear and effects. The syntax matches the Minecraft version you pick.

Enchantments

    Attribute modifiers

      Your command

      /give @p diamond_sword
      22 characters

      Gives the nearest player 1 Diamond Sword.

      Syntax and item lists checked against the real game server on 1.21.5, 26.3. Run it from chat, a command block or the server console.

      Need coloured or clickable text?

      Names here are plain text. For tellraw, title, sign and book commands with colours and click events, use the Tellraw generator.

      Tellraw Generator

      Commands need a server

      Run them on a server you control.

      Give and summon commands work best with operator access. Deploy a Java server in seconds and run every command in this tool.

      How to use the command generator

      Pick your Minecraft version first, because the command is written for it. Then choose /give or /summon, fill in the options and copy the result. The preview underneath explains in plain English what the command will do, and the tool flags anything that does not exist in your version. Paste the command into chat with operator permissions, a command block or your Minecraft server console.

      Example commands

      • Enchanted sword (1.21.5 and newer)

        /give @p diamond_sword[custom_name={text:"Sunblade",italic:false},enchantments={sharpness:5,unbreaking:3}]
      • Fast boots (1.21.5 and newer)

        /give @p diamond_boots[unbreakable={},attribute_modifiers=[{type:"minecraft:movement_speed",id:"command_generator:modifier_1",amount:0.1,operation:"add_multiplied_base",slot:"feet"}]]
      • Boss zombie (1.21.5 and newer)

        /summon minecraft:zombie ~ ~ ~ {CustomName:{text:"Gravelord"},CustomNameVisible:1b,attributes:[{id:"minecraft:max_health",base:100}],Health:100f,PersistenceRequired:1b,equipment:{mainhand:{id:"minecraft:iron_sword",count:1},head:{id:"minecraft:iron_helmet",count:1}}}

      Why commands differ between versions

      A command that works in one version often fails in another. These are the changes the generator handles for you.

      VersionWhat changed
      1.21.5 and newerNames are written as SNBT, enchantments and modifiers are plain lists, and mob gear lives under equipment.
      1.21.2 to 1.21.4Items use components with JSON text, and attributes lose the generic. prefix.
      1.21 to 1.21.1Attribute modifiers are identified by an id, and attributes still start with generic.
      1.20.5 to 1.20.6Items first move to components, and modifiers still need a uuid and name.
      1.20.2 to 1.20.4Older NBT tags in curly braces, with active_effects for mobs.
      1.19 to 1.20.1Older NBT tags, and mob effects use numeric ids.

      Each of the 6 groups was tested by running generated commands on a real Java server.

      Give and summon command tips

      • Use @p for the nearest player, @a for everyone and a player name for one person.
      • Turn on Never despawn so a named mob stays where you put it.
      • Use No AI for statues, shop NPCs and display mobs.
      • Long commands may not fit in older chat boxes, so use a command block instead.

      Share this tool

      Found it useful? Send the link to a friend or add it to your server wiki, Discord or forum.

      Link to this tool from your site

      <a href="https://sparkedhost.com/tools/minecraft-command-generator">Minecraft Command Generator</a>

      Minecraft Command Generator FAQ

      Can't find what you're looking for?

      Online
      • ?

        Why does the command change with the Minecraft version?

        Mojang changed how items and mobs are described several times. Since 1.20.5 items use data components instead of NBT tags, 1.21 changed attribute modifiers, 1.21.2 renamed attributes, and 1.21.5 changed text and mob equipment. Pick your version and the tool writes the matching syntax.

      • ?

        How do I use the /give command?

        Press T and paste the command, run it from a command block, or type it in your server console. You need operator permissions. The target decides who gets the item, so @p means the nearest player and @a means everyone.

      • ?

        How do I give an enchanted item with a custom name?

        Choose the item, type a custom name, then press Add enchantment and pick one or more. You can set any level from 1 to 255. The tool warns when a level is above the vanilla maximum.

      • ?

        How do I summon a mob with custom health and gear?

        Switch to /summon, choose the mob and add a name, health, equipment and effects. Health above 20 also raises the mob's maximum health so it can actually hold that much.

      • ?

        Which versions does it support?

        Java Edition 1.19 and newer, in six syntax groups. Each group was checked by running the generated commands on a real server of the versions shown under the command. Bedrock Edition uses different commands and isn't covered.