Scanning probe microscopy is a versatile and powerful method that uses sharp tips to image, measure and manipulate matter at surfaces with atomic resolution1, 2. At cryogenic temperatures, scanning probe microscopy can even provide electron tunnelling spectra that serve as fingerprints of the vibrational properties of adsorbed molecules3, 4, 5 and of the electronic properties of magnetic impurity atoms6, 7, thereby allowing chemical identification. But in many instances, and particularly for insulating systems, determining the exact chemical composition of surfaces or nanostructures remains a considerable challenge. In principle, dynamic force microscopy should make it possible to overcome this problem: it can image insulator, semiconductor and metal surfaces with true atomic resolution8, 9, 10, by detecting and precisely measuring11, 12, 13 the short-range forces that arise with the onset of chemical bonding between the tip and surface atoms14, 15 and that depend sensitively on the chemical identity of the atoms involved. Here we report precise measurements of such short-range chemical forces, and show that their dependence on the force microscope tip used can be overcome through a normalization procedure. This allows us to use the chemical force measurements as the basis for atomic recognition, even at room temperature. We illustrate the performance of this approach by imaging the surface of a particularly challenging alloy system and successfully identifying the three constituent atomic species silicon, tin and lead, even though these exhibit very similar chemical properties and identical surface position preferences that render any discrimination attempt based on topographic measurements impossible.