The usual definition of radiation energy density in the context of statistical physics is given by $$U=a_{B}T^{4}$$
With $a_{B}=7.5657\times 10^{-16} J m^{-3} K^{-4}$. So $U$ has units of $J m^{-3}$
On the other hand I read in some General relativity textbooks that the parameter $\rho$ (the parameter that appears in the Friedmann equations) is the energy density, but if I look at the units in the of the Friedmann equation for the Hubble parameter
$$H^{2}=\frac{8 \pi G }{3}\rho$$
I find that $\rho$ has units of $kg/m^3$. So in the particular case of radiation $\rho_{r}$ don't have the same units as $U$, then $\rho_{r}$ is not the energy density of radiation?