The parent compounds of the copper oxide high-transition-temperature (high-Tc) superconductors are unusual insulators (so-called Mott insulators). Superconductivity arises when they are 'doped' away from stoichiometry. For the compound Bi2Sr2CaCu2O8+x, doping is achieved by adding extra oxygen atoms, which introduce positive charge carriers ('holes') into the CuO2 planes where the superconductivity is believed to originate. Aside from providing the charge carriers, the role of the oxygen dopants is not well understood, nor is it clear how the charge carriers are distributed on the planes. Many models of high-Tc superconductivity accordingly assume that the introduced carriers are distributed uniformly, leading to an electronically homogeneous system as in ordinary metals. Here we report the presence of an electronic inhomogeneity in Bi2Sr2CaCu2O8+x, on the basis of observations using scanning tunnelling microscopy and spectroscopy. The inhomogeneity is manifested as spatial variations in both the local density of states spectrum and the superconducting energy gap. These variations are correlated spatially and vary on the surprisingly short length scale of approximately 14 A. Our analysis suggests that this inhomogeneity is a consequence of proximity to a Mott insulator resulting in poor screening of the charge potentials associated with the oxygen ions left in the BiO plane after doping, and is indicative of the local nature of the superconducting state.