An impediment to a mechanistic understanding of how some species sense the geomagnetic field ("magnetoreception") is the lack of vertebrate genetic models that exhibit well-characterized magnetoreceptive behavior and are amenable to whole-brain analysis. We investigated the genetic model organisms zebrafish and medaka, whose young stages are transparent and optically accessible. In an unfamiliar environment, adult fish orient according to the directional change of a magnetic field even in darkness. To enable experiments also in juveniles, we applied slowly oscillating magnetic fields, aimed at generating conflicting sensory inputs during exploratory behavior. Medaka (but not zebrafish) increase their locomotor activity in this assay. Complementary brain activity mapping reveals neuronal activation in the lateral hindbrain during magnetic stimulation. These comparative data support magnetoreception in teleosts, provide evidence for a light-independent mechanism, and demonstrate the usefulness of zebrafish and medaka as genetic vertebrate models for studying the biophysical and neuronal mechanisms underlying magnetoreception.