Skip to content
[/craft]
Give Custom Named Sword

Give Custom Named Sword

Create a diamond sword with a custom display name

✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026

Gives a diamond sword named Excalibur in gold text using the 1.21.5+ SNBT custom_name component. Edit the text and color values to name any item. Note that the SNBT text form replaced the old JSON-string syntax in 1.21.5.

/give @p diamond_sword[custom_name={text:"Excalibur",color:"gold"}]

How to use

  1. Open chat (T on Java).
  2. Replace Excalibur with your desired name and pick a color.
  3. Paste and press Enter.
  4. The named sword appears with the colored label in your inventory.

Related commands