Although electromagnetic brain stimulation is a promising treatment in neurology and psychiatry, clinical outcomes are variable, and underlying mechanisms are ill-defined, which impedes the development of new effective stimulation protocols. Here, we show, in vivo and ex vivo, that repetitive transcranial magnetic stimulation at low-intensity (LI-rTMS) induces axon outgrowth and synaptogenesis to repair a neural circuit. This repair depends on stimulation pattern, with complex biomimetic patterns being particularly effective, and the presence of cryptochrome, a putative magnetoreceptor. Only repair-promoting LI-rTMS patterns up-regulated genes involved in neuronal repair; almost 40% of were cryptochrome targets. Our data open a new framework to understand the mechanisms underlying structural neuroplasticity induced by electromagnetic stimulation. Rather than neuronal activation by induced electric currents, we propose that weak magnetic fields act through cryptochrome to activate cellular signaling cascades. This information opens new routes to optimize electromagnetic stimulation and develop effective treatments for different neurological diseases.