Structural and electronic properties of C–H⋯O contacts in compounds containing a formyl group are investigated from the perspective of both hydrogen bonding and dipole–dipole interactions, in a systematic and graded approach. The effects of α-substitution and self-association on the nature of the formyl H-atom are studied with the NBO and AIM methodologies. The relative dipole–dipole contributions in formyl C–H⋯O interactions are obtained for aldehyde dimers. The stabilities and energies of aldehyde clusters (dimer through octamer) have been examined computationally. Such studies have an implication in crystallization mechanisms. Experimental X-ray crystal structures of formaldehyde, acrolein and N-methylformamide have been determined in order to ascertain the role of C–H⋯O interactions in the crystal packing of formyl compounds.