CdTe thin films are deposited using a spray pyrolysis technique without and with in‐situ CdCl2 treatment. An X‐ray photoelectron spectroscopy technique is used to study the Cd, Te, O and Cl chemical environments and the valence‐band spectra of the CdTe film surface. A shift in the Fermi‐level position of ∼200 meV towards the valence‐band maximum is observed in the CdTe film after the in‐situ CdCl2 treatment, which is attributed to the increment of the Cl concentration and the improvement in the grain growth of the CdTe film. In addition to the increment of the Cl concentration, less surface oxidation is observed compared to that for ex‐situ treatment. (© 2004 WILEY‐VCH Verlag GmbH & Co. KGaA, Weinheim)