The molecular genetics of congenital adrenal hyperplasia due to 21-hydroxylase deficiency are reviewed. In Sweden, mutation detection based on allele-specific PCR has been used for genetic diagnosis of this disease since 1993. Around 400 affected 21-hydroxylase genes have been analysed so far. An update of the spectrum of mutations among the Swedish patients shows that nine common pseudogene-derived mutations are responsible for the disease in around 95% of alleles. A total of 13 rare, mostly population-specific mutations have been characterized among the remaining 5%. The mutations can be divided into different groups according to severity. This makes it possible to predict clinical outcome in affected subjects based on genotyping. The risk of salt-wasting and prenatal virilization can be estimated, and over-treatment can be avoided in mildly affected cases.