The state of deprotonation/protonation of surfaces has far-ranging implications in chemistry, from acid-base catalysis1 and the electrocatalytic and photocatalytic splitting of water2, to the behaviour of minerals3 and biochemistry4. An entity's acidity is described by its proton affinity and its acid dissociation constant pKa (the negative logarithm of the equilibrium constant of the proton transfer reaction in solution). The acidity of individual sites is difficult to assess for solids, compared with molecules. For mineral surfaces, the acidity is estimated by semi-empirical concepts, such as bond-order valence sums5, and increasingly modelled with first-principles molecular dynamics simulations6,7. At present, such predictions cannot be tested-experimental measures, such as the point of zero charge8, integrate over the whole surface or, in some cases, individual crystal facets9. Here we assess the acidity of individual hydroxyl groups on In2O3(111)-a model oxide with four different types of surface oxygen atom. We probe the strength of their hydrogen bonds with the tip of a non-contact atomic force microscope and find quantitative agreement with density functional theory calculations. By relating the results to known proton affinities of gas-phase molecules, we determine the proton affinity of the different surface sites of In2O3 with atomic precision. Measurements on hydroxylated titanium dioxide and zirconium oxide extend our method to other oxides.