Label-free detection of the material composition of nanoparticles could be enabled by the quantification of the nanoparticles' inherent dielectric response to an applied electric field. However, the sensitivity of dielectric nanoscale objects to geometric and non-local effects makes the dielectric response extremely weak. Here we show that electrostatic force microscopy with sub-piconewton resolution can resolve the dielectric constants of single dielectric nanoparticles without the need for any reference material, as well as distinguish nanoparticles that have an identical surface but different inner composition. We unambiguously identified unlabelled ~10 nm nanoparticles of similar morphology but different low-polarizable materials, and discriminated empty from DNA-containing virus capsids. Our approach should make the in situ characterization of nanoscale dielectrics and biological macromolecules possible.