Minecraft wiki entry for Anvil, associated text: Any item or stack of items can be renamed at a cost of one level plus any prior-work penalty. If the player is only renaming, the maximum total cost is 39 levels. The maximum length for renaming is 35 characters‌[BE only] / 50 characters‌[JE only]. Some items have special effects when renamed: