An anvil is a block that allows players to repair items, combine enchantments, and rename items by expending experience points. Crafted from iron ingots, it is subject to damage and can eventually break after repeated use. Its ability to manipulate enchanted books and equipment makes it a valuable tool for enhancing gear, though the cost in experience can increase if items are worked on multiple times.
The numerical item ID for Anvil is 145
Numerical item IDs will only work in Minecraft versions below 1.13.
The item ID for Anvil is minecraft:anvil
This is the spawn command to give yourself Anvil in Minecraft which includes the Minecraft /give command. If you are using the Essentials plugin you will need to use /minecraft:give instead of /give