Obtain a name tag from chests, fishing, trading, or loot
Find an anvil
Place the name tag in the anvil
Type the name you want
Take the renamed name tag from the anvil
Hold the renamed name tag
Right-click or use it on the mob you want to name
The mob will display the new name above it
Use a name tag on a mob to prevent it from despawning
Rename a name tag to “Dinnerbone” or “Grumm” to flip a mob upside down
Rename a name tag to “jeb_” to make a sheep cycle through colors
Use a name tag on a villager, pet, or other mob to give it a custom name
