How birds sense the variations in Earth's magnetic field for navigation is poorly understood, although cryptochromes, proteins homologous to photolyases, have been proposed to participate in this magnetic sensing. Here, in electrochemical studies with an applied magnetic field, we monitor the repair of cyclobutane pyrimidine dimer lesions in duplex DNA by photolyase, mutants of photolyase, and a modified cryptochrome. We find that the yield of dimer repair is dependent on the strength and angle of the applied magnetic field even when using magnetic fields weaker than 1 gauss. This high sensitivity to weak magnetic fields depends upon a fast radical pair reaction on the thymines leading to repair. These data illustrate chemically how cyclobutane pyrimidine dimer repair may be used in a biological compass informed by variations in Earth's magnetic field.