Scanning tunneling microscopy is utilized to investigate the local density of states of a CH3NH3PbI3–xClxperovskite in cross-sectional geometry. Two electronic phases, 10–20 nm in size, with different electronic properties inside the CH3NH3PbI3–xClxperovskite layer are observed by the dI/dVmapping and point spectra. A power law dependence of the dI/dVpoint spectra is revealed. In addition, the distinct electronic phases are found to have preferential orientations close to the normal direction of the film surface. Density functional theory calculations indicate that the observed electronic phases are associated with local deviation of I/Cl ratio, rather than different orientations of the electric dipole moments in the ferroelectric phases. By comparing the calculated results with experimental data we conclude that phase A (lower contrast in dI/dVmapping at −2.0 V bias) contains a lower I/Cl ratio than that in phase B (higher contrast in dI/dV).