HM

A Hidden Machine (Japanese: ひでんマシン Secret Machine), HM for short, is an item that, like a TM, is used to teach a Pokémon a move. HMs can be used an unlimited number of times and cannot be disposed of. Moves taught by HMs cannot normally be forgotten.

HMs are not present in Generation VII, having been replaced by the Poké Ride and Secret Technique features for field navigation. Three of the HMs were changed into TMs, while other HM moves can be taught through other methods.

Mechanics
HMs can be used any number of times, and cannot be tossed or sold. This contrasts to TMs in Generations I to IV, in which TMs are single-use items that can be tossed and sold.

Moves taught by HMs are all field moves in the games in which they are HMs, but some field moves are not HM moves. Like all field moves, they can be used outside of battle even if the Pokémon has fainted or no in that move (using it in the field does not consume PP). Except for Generation V, specific Badges must be obtained by the player before they can use an HM move outside of battle to advance the game's storyline.

HM moves cannot be forgotten by Pokémon under normal circumstances in the games in which they are HMs, even if they are not learned via HM. They can be deleted by the Move Deleter, although cannot be deleted in  if the Pokémon is the only one in the player's party or PC that knows the move. If a Pokémon learns a new move while in Pokémon Day Care, an HM move can be replaced if it is at the top of the list; however, in Generation I the Pokémon Day Care will not accept Pokémon that know HM moves.

A Pokémon knowing an HM move cannot be sent forward from Generation III to Generation IV or from Generation IV to Generation V unless the HM move is removed (via Move Deleter). prevents sending forward from despite not being considered an HM by those games, while  and  only prevent Pokémon being sent forward from the games they are an HM in. Pokémon with Whirlpool can freely be sent into from Generation III, while Pokémon with Dive can freely be sent into Generation V games. Unlike in previous inter-generational transfers, Pokémon sent from Generation I or V to Poké Transporter that know HM moves do not require these moves to be deleted. Pokémon that know HM moves can also be freely deposited and withdrawn from Pokémon Bank.

In Generation V, Pokémon knowing an HM move cannot be traded via infrared communications if they are in the player's party, to prevent a player from potentially becoming stuck somewhere that requires an HM move to escape.

In Generation III and IV, if the player attempts to release a Pokémon that is the only Pokémon in their party or PC that knows a certain HM move, it will immediately return. In Generation III, these moves are and. In Generation IV, they are Surf,, and , as well as in.

Generation I
In Generation I, five of the 165 moves are HM moves, of which three (,, and ) are required for completing the game. Of these five, four of them remain as HM moves even through Generation VI, while the fifth,, retains the ability to be used outside of battle (to light dark caves in Generation V, or reduce encounters with wild Pokémon in Generation VI).

None of these moves are able to be forgotten in Generation I, and a Pokémon with these moves cannot be raised by the Pokémon Day Care on. Unlike in later generations, all of these moves must be selected from the Pokémon screen to be used.

Generation II
In Generation II two new moves become HMs. The five HMs from Generation I return, while a new move,, becomes an HM, and an old move, , becomes another HM.

A Move Deleter was added to the games, mostly with the intention of making possible the ability to delete that a  had learned in order to be able to trade it back, though with the side effect of HM moves now being able to be forgotten.

From this generation on, Pokémon with HM moves are allowed in the Day Care, and fathers with HM moves will pass the moves down to their children as they would a TM move. HM moves can also be used just by checking the obstacle that the HM will clear, such as able water or a movable rock.

Hoenn
In Hoenn one of the Generation II HMs lost its status, while another two moves became HMs, raising the number of HMs to eight.

Kanto
In Kanto, due to a lack of use for, HM08 is unobtainable and can only be accessed through cheating. The first five HMs can be acquired through the same methods as in Generation I, while HM06 and HM07 can be found in the Sevii Islands later in the game.

Sinnoh
In Sinnoh, for the first time, one of the original HMs lost its status to a new move, while HM08 was brought back as a different move.

Johto and Kanto
Defog lost its HM status in Johto for the return of ; all other HMs retained their status from the prior Sinnoh games.

Generation V
HMs were reduced to six in Generation V; HM07 and HM08 no longer exist in the coding of. Dive returns for use in Unova. This generation marks the first time that HM moves do not require Gym Badges for use outside of battle. Although most HM moves cannot be obtained before earning certain Gym Badges, if the player obtains a Pokémon that has learned an HM move through other means (via level-up, trading, etc.) the player will be able to use the HM in the field without restrictions.

When a move is replaced by an HM, the HM move takes on the current PP of the replaced move until healed or replenished. The same also applies for replacing old moves with TMs.

Generation VI
HMs have returned to requiring a Badge to use them.

When a move is replaced by an HM, the HM move takes on the current PP of the replaced move until healed or replenished. The same also applies for replacing old moves with TMs.

Kalos
HMs were reduced to five in Kalos like in Generation l, with HM06 being removed. The HMs are the same as Generation V.

Though is not an HM, it can still be used outside of battle, unlike in Generation V.

Hoenn
HMs were increased to seven in Hoenn. and regained their HM status.

HM-exclusive moves
Due to the nature of HMs, these moves are often exclusively taught by them. is the only HM move that was never HM-exclusive.

Pokémon Mystery Dungeon series
Prior to, HMs can be used an infinite amount of times and are colored differently to TMs. HMs cannot be used inside dungeons and are more difficult to obtain than TMs. In Red Rescue Team and Blue Rescue Team, each HM can only be found once in specific dungeons, while in Explorers of Time and Darkness and Sky, they can only be found in Destiny Tower or Final Maze. They play a particular role in Red and Blue Rescue Team, where the player must either have a specific HM in the Toolbox or have a party member that knows the move taught by that HM in order to access certain dungeons.

In, HMs are treated more or less than same as TMs. Like TMs, they can only be used once and have the same bag sprite as TMs. Despite this, when a HM is dropped in a dungeon, the color of the HM differs from that of a TM.

In Pokémon Origins
appeared in File 2: Cubone. Much like in, it was given to by the captain of S.S. Anne after helping him recover from his seasickness.

In the Pokémon Adventures manga
In What a Dragonite, was revealed to have already obtained  for his Ivysaur,  for his Snorlax, and  for his Pikachu, one of which he had won in a bike race in Wake Up—You're Snorlax!. When he tried to get his hands on, he ran into some trouble with a wild , eventually leading to the Hidden Machine getting destroyed. To help him, Misty gave Red her Gyarados in exchange for his, since it already knew Surf.

It was also revealed that had found HM03 before Red, fueling the young Trainer's determination of finding it too.

In the Pokémon Zensho manga
In Vermilion City, after defeating Lt. Surge, received the HM for Cut from the captain of S.S. Anne, whom he had met earlier.

Trivia

 * is the only HM with a unique type. All other HM moves share their type with at least one other HM move.
 * Tracey's Scyther is the first Pokémon belonging to a main character of the anime to have used a then-current HM move, . It wasn't until the that one of 's Pokémon used a then-current HM move; Ash's Grotle used.
 * Although debatable, other Pokémon may have used, , and throughout the anime; however, they were not directly ordered to use the move.
 * The only then-current HM moves that were also able to be learned by Pokémon by level-up were and . Former HMs, , , , , and  are also learnable by level, but only since their loss of HM status. Moves that regained their HM status, like Whirlpool and Dive, remained learnable by level-up. Waterfall remains the only HM move that has been learnable by level-up since it was introduced as a move, prior to gaining HM status.
 * In Generation IV, all moves that were at one time an HM can be taught via some method, with Flash being available by TM70 and Dive being available by Move Tutor. Defog and Whirlpool, which replace each other in the Sinnoh- and Johto-based games, are both HM05.
 * Generation IV is the only generation in which two moves share the same HM number.
 * HM moves have so far been only of the Flying, Fighting, Water, and Normal types.
 * In, on , Swimmer Lori states " is no longer the only HM move you use in water" when she is defeated. This is a reference to Generation I, where the only HM usable in the water was Surf.
 * In the core series, the only ways to delete an HM move are through the Move Deleter and the Pokémon Day Care. However, the move can be deleted by normal means in a game in which it is not taught through an HM.
 * is the only HM in Generation V that is not found in a different location between and.
 * In, , Kylie and Ashlyn, two Kalosian HM-makers encountered at Poni Breaker Coast during the post-game, explain that HMs are not only difficult to make, they also cannot legally be sold for money in most regions.