Tetravalent tin (Sn4+)-based inorganic perovskite semiconductors like Cs2SnI6 are expected to replace lead-based perovskite counterparts due to advantages such as structural stability and environmental friendliness. In this paper, we reported the dopant compensation effect in the component-dependent self-doped (111)-oriented Cs2SnI6 thin films grown with pulsed laser deposition (PLD) at room temperature. The films were grown on (100)-SrTiO3 (STO) substrates at room temperature by PLD. Hall results of the Cs2SnI6 films with different components realizing by controlling the ratio of SnI4/CsI in the targets demonstrate a clear change of conductivity type from N-type to P-type, while the carrier concentration decreases from 1018 to 1013 and accordingly the film resistivity increases significantly from 3.8 to 2506 Ω cm. The defect-related optical fingerprints of Cs2SnI6 films were also investigated with temperature-dependent photoluminescence spectroscopy. At low temperatures of 10 K, the Cs2SnI6 films exhibit donor-bound (D0X) and donor-acceptor pair (DAP) emission, respectively, due to the self-doping effect. These results indicate that controlling the composition of the PLD target is a powerful way to tune the electrical properties of Cs2SnI6 films for possible applications in solar cells or X-ray detectors.