The item upgrade glitch is a glitch found in the NES version of Final Fantasy III. Using this glitch, it is possible to change items and equipment in the player's inventory into other items and equipment. Though there are several methods to perform the glitch, they all require the player to arrange the inventory in a specific way (the exact arrangement differs with the method). The player must also have 99 of any item that they can win in battle; the most common items used are Potions, which can be easily won in the Altar Cave. When the player wins that item in battle, the item in the designated spot is changed into another item, determined by its place in the game's equipment index.
The glitch is the only way to obtain the earliest hammer and the Dream Harp in the NES version. In order to do so, the player should apply the glitch once to a Madhura Harp to get a Dream Harp, and twice to a Rune Staff to get the Hammer (although, in this latter case, it is a downgrade). Both the Madhura Harp and the Rune Staff can be purchased in shops short after obtaining the jobs that can use their upgrades.
The glitch's most notable use is referred to as the fully-equipped Onion Knight (abbreviated "FEOK") strategy. Due to the design of the game's equipment index, a single use of this glitch will upgrade a Leather Shield, Leather Helmet, Leather Robe or Copper Ring into an Onion Shield, Onion Helmet, Onion Armor or Onion Glove, respectively; the Onion Sword is slightly more difficult to get, requiring 21 upgrades from a Long Sword. Since this glitch is possible to do at the beginning of the game, it is possible (with some time) to get four full sets of Onion equipment for each of the playable characters, making them far stronger than they should be at that point of the game.