An analytical expression for the three-loop form factors for ggH and γγH is derived for the contributions which involve massless quark loops. The result is expressed in terms of harmonic polylogarithms. It fully agrees with previously obtained kinematical expansions, and confirms a recent semi-numerical approximation which extends over the full kinematic range.