We investigate the influence of cosmic magnetic fields on gravitational wave perturbations and find exact solutions on large scales. We show that a large-scale magnetic field can generate large-scale non-decaying gravitational waves. In the general case where gravitational waves are generated by other mechanisms, a large-scale magnetic field introduces a new decaying tensor mode and modifies the non-decaying mode. The direct effect of the magnetic field is to damp the gravitational waves, while an indirect magneto-curvature effect can either damp or boost the waves. A magnetic field also leads to a breaking of statistical isotropy, and the magnetic imprint on the tensor spectrum in principle provides a means of detecting a primordial field.