Swedish health care and national health registers are dependent on the presence of a unique identifier. This paper describes the Swedish personal identity number (PIN) and explores ethical issues of its use in medical research. A ten-digit-PIN is maintained by the National Tax Board for all individuals that have resided in Sweden since 1947. Until January 2008, an estimated 75,638 individuals have changed PIN. The most common reasons for change of PIN are incorrect recording of date of birth or sex among immigrants or newborns. Although uncommon, change of sex always leads to change of PIN since the PIN is sex-specific. The most common reasons for re-use of PIN (n = 15,887), is when immigrants are assigned a PIN that has previously been assigned to someone else. This is sometimes necessary since there is a shortage of certain PIN combinations referring to dates of birth in the 1950s and 1960s. Several ethical issues can be raised pro and con the use of PIN in medical research. The Swedish PIN is a useful tool for linkages between medical registers and allows for virtually 100% coverage of the Swedish health care system. We suggest that matching of registers through PIN and matching of national health registers without the explicit approval of the individual patient is to the benefit for both the individual patient and for society.