From Bulbapedia, the community-driven Pokémon encyclopedia.
The remaining HP glitch is present in Pokémon Red, Blue, and Yellow. It allows players to convert the remaining HP of a Pokémon into its index number, effectively allowing the player to obtain any Pokémon in Generation I.
This glitch requires a Pokémon with a catch rate of 255: Caterpie, Weedle, Pidgey, Rattata, Spearow, Ekans, Sandshrew, Zubat, Oddish, Diglett, Meowth, Poliwag, Bellsprout, Geodude, or Magikarp.
Performing the glitch
First, the player must deposit a Pokémon with a catch rate of 255 that has a remaining HP equal to the index number of the desired resulting Pokémon into an empty PC Box, followed by three other Pokémon and a Q ◣/'M (FF). The player must then fill their party with Pokémon (but none of the Pokémon just deposited). The player must then change the Box back to the one which contains the deposited Pokémon. The player must then catch a wild Pokémon. All Pokémon but one from the party must then be deposited into a Box other than the one containing Q ◣/'M (FF). The Q ◣/'M (FF) must then be withdrawn to the player's party, followed by the caught wild Pokémon, two of the Pokémon deposited at the start, and the Pokémon with the remaining HP. The Pokémon with the remaining HP then becomes an unstable hybrid of the initial species and the species whose index number matched the remaining HP of the Pokémon. The Pokémon can be stabilized by taking it to the Day Care Center.
| Videos are currently unavailable on Bulbapedia; instead, you can watch the video on YouTube here.