The chemical reactions and pathways resulting in the formation of hydrogen peroxide (H2O2), a potentially harmful byproduct of aerobic cellular respiration which can cause damage to DNA.
H2O2 biosynthetic process