Context. The formation of carbon dioxide ice in quiescent regions of molecular clouds has not yet been fully understood, even though CO 2 is one the most abundant species in interstellar ices. Aims. CO 2 formation was studied via oxidation of formaldehyde molecules on cold surfaces under conditions close to those encountered in quiescent molecular clouds to evaluate the efficiency and the activation barrier of the H 2 CO + O reaction. Methods. Formaldehyde ices were exposed to O atoms using a differentially pumped beam line. The H 2 CO + O reaction experiments were carried out on two different surfaces of astrophysical interest (amorphous water ice and oxidised graphite) held at 10 or 55 K. The products were probed via infrared and mass spectroscopy by using RAIRS and temperature-programmed desorption techniques. Results. In this paper we show that the H 2 CO + O reaction can efficiently form carbon dioxide in the solid phase. The activation barrier for the reaction, based on a model fit to the experimental data, was estimated to be 335 ± 55 K. Conclusions. The H 2 CO+O reaction on cold surfaces can be added to the set of pathways that lead to carbon dioxide in the interstellar ices. Astrophysically, the abundance of CO 2 in quiescent molecular clouds may potentially be explained by three reactions occurring on cosmic grains: CO + OH, CO + O, and H 2 CO + O.