Formaldehyde ( H _ { 2 } CO ) is a reliable tracer to accurately measure the physical parameters of dense gas in star forming regions . We aim to directly determine the kinetic temperature and spatial density with formaldehyde for the \sim 100 brightest ATLASGAL-selected clumps ( the TOP100 sample ) at 870 \mu m representing various evolutionary stages of high-mass star formation . Ten transitions ( J = 3–2 and 4–3 ) of ortho- and para-H _ { 2 } CO near 211 , 218 , 225 , and 291 GHz were observed with the Atacama Pathfinder EXperiment ( APEX ) 12 m telescope . Using non-LTE models with RADEX , we derive the gas kinetic temperature and spatial density using the measured para-H _ { 2 } CO 3 _ { 21 } –2 _ { 20 } /3 _ { 03 } –2 _ { 02 } , 4 _ { 22 } –3 _ { 21 } /4 _ { 04 } –3 _ { 03 } , and 4 _ { 04 } –3 _ { 03 } /3 _ { 03 } –2 _ { 02 } ratios . The gas kinetic temperatures derived from the para-H _ { 2 } CO 3 _ { 21 } –2 _ { 20 } /3 _ { 03 } –2 _ { 02 } and 4 _ { 22 } –3 _ { 21 } /4 _ { 04 } –3 _ { 03 } line ratios are high , ranging from 43 to > 300 K with an unweighted average of 91 \pm 4 K. Deduced T _ { kin } values from the J = 3–2 and 4–3 transitions are similar . Spatial densities of the gas derived from the para-H _ { 2 } CO 4 _ { 04 } –3 _ { 03 } /3 _ { 03 } –2 _ { 02 } line ratios yield 0.6–8.3 \times 10 ^ { 6 } cm ^ { -3 } with an unweighted average of 1.5 ( \pm 0.1 ) \times 10 ^ { 6 } cm ^ { -3 } . A comparison of kinetic temperatures derived from para-H _ { 2 } CO , NH _ { 3 } , and the dust emission indicates that para-H _ { 2 } CO traces a distinctly higher temperature than the NH _ { 3 } ( 2,2 ) / ( 1,1 ) transitions and the dust , tracing heated gas more directly associated with the star formation process . The H _ { 2 } CO linewidths are found to be correlated with bolometric luminosity and increase with the evolutionary stage of the clumps , which suggests that higher luminosities tend to be associated with a more turbulent molecular medium . It seems that the spatial densities measured with H _ { 2 } CO do not vary significantly with the evolutionary stage of the clumps . However , averaged gas kinetic temperatures derived from H _ { 2 } CO increase with time through the evolution of the clumps . The high temperature of the gas traced by H _ { 2 } CO may be mainly caused by radiation from embedded young massive stars and the interaction of outflows with the ambient medium . For L _ { bol } / M _ { clump } \gtrsim 10 L _ { \odot } /M _ { \odot } , we find a rough correlation between gas kinetic temperature and this ratio , which is indicative of the evolutionary stage of the individual clumps . The strong relationship between H _ { 2 } CO line luminosities and clump masses is apparently linear during the late evolutionary stages of the clumps , indicating that L _ { H _ { 2 } CO } does reliably trace the mass of warm dense molecular gas . In our massive clumps H _ { 2 } CO line luminosities are approximately linearly correlated with bolometric luminosities over about four orders of magnitude in L _ { bol } , which suggests that the mass of dense molecular gas traced by the H _ { 2 } CO line luminosity is well correlated with star formation .