We compute the three-loop QCD corrections to the massive quark-anti-quark-photon form factors F1 and F2 involving a closed loop of massless fermions. This subset is gauge invariant and contains both planar and non-planar contributions. We perform the reduction using FIRE and compute the master integrals with the help of differential equations. Our analytic results can be expressed in terms of Goncharov polylogarithms. We provide analytic results for all master integrals which are not present in the large-N c calculation considered in refs. [1, 2].