We show that repeating units from all reported disease genes are capable of forming hairpins of common structure and threshold stability. The threshold stability is roughly -50 kcal per hairpin and is influenced by the flanking sequence of the gene. Hairpin stability has two components, sequence and length; only DNA of select sequences and the correct length can form hairpins of threshold energy. There is a correlation among the ability to form hairpins of threshold stability, the sequence selectivity of expansion, and the length dependence of expansion. Additionally, hairpin formation provides a potential structural basis for the constancy of the CCG region of the Huntington's disease gene in individuals and explains the stabilizing effects of AGG interruptions in FMR1 alleles.