The anvil is primarily used to repair tools, armor, and weapons, which it can do without stripping their enchantments, unlike the grindstone and crafting table.
This page explains the mechanics of the anvil. For anvil mechanics prior to 1.8, see Anvil mechanics/Before 1.8.Įxample showing a repair of two diamond pickaxes. This article is about the current mechanics.