  We explore a novel process in the early Universe in which thermalized photons
are converted into gravitons in the presence of strong primordial magnetic
fields. It is found that the frequency of generated gravitational waves (GWs)
is typically of order of GHz and their amplitude can be up to $
\Omega_\mathrm{GW}h^2 \sim 10^{-10}$. If detected with future developments of
the technology to explore this frequency region, the produced stochastic GW
background enables us to know when and how strong the primordial magnetic
fields are generated. From the peak frequency of the GWs, we can also probe the
number of relativistic degrees of freedom at that time.
