Secret passwords in Pokemon Diamond, Pearl, Platinum, HeartGold, and SoulSilver

A hidden feature in these Pokemon games is the ability to tell a certain NPC 4 specific words or phrases using the easy chat system in order to unlock special rewards. Which words are required are unique per save file.

In Diamond, Pearl, and Platinum these rewards include 8 different special PC box wallpapers. The NPC to speak to is located on the 3rd floor of the Jubilife TV station.

In HeartGold and SoulSilver, rewards include 8 different PC box wallpapers plus 3 different Pokemon eggs. The NPC to speak to is Primo, located in the Violet City Pokemon Center.

Below is both a calculator to find the passwords for your specific save file, as well as an in-depth explanation of how the password system functions.


How it works

The process to detect a set of 4 input words as a password to unlock a reward proceeds as follows:

  1. A list of special words (small subset of all selectable words) are designated as "password words". This list is unique per language and is hard coded into the ROM. See below for the lists of all of these words.
  2. The player's four input words are converted into their respective indices of the words in the password list. If the player selected any words not in the password list, the process fails.
  3. The four word indices are then encoded into four byte values, with this process:
    1. The first index must be 0-255. The 1st byte value is equal to the first index.
    2. The 3 remaining indices must not be 256 or more greater than the previous. For example, 5 cannot be followed by 300 as this is an increase of 295.
    3. Each index must not be less than the previous one, except in cases where the indices wrap around. For example, a 100 followed by a 90 is disallowed, but a 340 followed by a 20 is allowed as it is an increase of 31, if wrapping around to 0 at 351 (as is the number of words in English HeartGold).
    4. The 2nd through 4th byte values are the increase (or wrap-around increase) of each index compared to the previous one.
    For example, word indices of [87, 156, 218, 18] would be encoded to the bytes [0x57, 0x45, 0x3e, 0x97].
  4. The 4 byte values are now transformed using a nonlinear permutation process as follows:
    1. The 4 byte values are treated as a single 32-bit chunk, with the 1st byte being the most significant bits and the 4th byte being the least significant, and the chunk is rotated bitwise 5 bits to the right.
    2. The upper nybble of the 4th byte is XOR-ed against both nybbles of each of the other 3 bytes.
    3. The 1st, 2nd, and 3rd bytes are treated as a single 24-bit chunk, and are rotated bitwise to the right, similar to 3.a., except by a distance defined by the lower nybble of the 4th byte.
    4. The 1st byte is XOR-ed against the 2nd and 3rd bytes.
    For example, the bytes [0x57, 0x45, 0x3e, 0x97] would be transformed to [0x64, 0x30, 0x39, 0xf4].
  5. The bytes are now checked to see if they are valid to unlock a reward as follows:
    1. The lower nybble of the 1st byte indicates which reward is unlocked. If it is outside the range of available rewards, the check fails.
    2. The 2nd and 3rd bytes, concatenated together, with the 2nd byte forming the most significant bits, must equal the trainer's ID.
    3. The upper nybble of the 1st byte must equal the magic number 6 (0b0110).
    4. The 1st byte, plus the 2nd byte, multiplied by the 3rd byte, must equal the 4th byte modulo 256.
    5. If all the checks pass, the reward defined in 4.a. is returned as unlocked.
    For example, the bytes [0x64, 0x30, 0x39, 0xf4] are valid to unlock reward number 4 for trainer ID 12345, with the magic number and checksum matching.

All of the steps are reversible, so the final state of the bytes may be arranged and then the steps performed backwards to arrive at the needed words.

In Diamond and Pearl, the process is largely the same, with these changes:

Lists of password words

Platinum/HeartGold/SoulSilver, English

Platinum/HeartGold/SoulSilver, 日本語

Platinum/HeartGold/SoulSilver, Français

Platinum/HeartGold/SoulSilver, Deutsch

Platinum/HeartGold/SoulSilver, Italiano

Platinum/HeartGold/SoulSilver, Español

Platinum/HeartGold/SoulSilver, 한국인

Diamond/Pearl, English

Diamond/Pearl, 日本語

Diamond/Pearl, Français

Diamond/Pearl, Deutsch

Diamond/Pearl, Italiano

Diamond/Pearl, Español

Diamond/Pearl, 한국인