The structural, electronic, optical, and photocatalytic properties of pure and Ti-doped on the B-site of Cs2BI6 2 BI 6 (B = Hf and Zr) are explored using the first principal calculation based on the Density Functional Theory (DFT). Our finding band gap values are 3.175 eV for Cs2ZrI6 2 ZrI 6 and 4.153 eV for Cs2HfI6 2 HfI 6 by PBE-GGA + mBJ approximation, is closer to the experimental data. Besides, Cs 2 B 1 _ x Ti x I 6 (B = Zr, Hf and x = 0, 0.25, 0.5, 0.75) compounds studied are p-type semiconductors with direct band gap. However, Cs2TiI6 2 TiI 6 has an indirect band gap when the compounds are completely doped with Ti atom (x = 1) at the B-site. In addition, the band gap reduced after the Titanium impurities were substituted on the Zr or Hf sites, from 2.983 eV for Cs2ZrI6 2 ZrI 6 (x = 0) to 1.802 eV for Cs 2 Zr 0.25 Ti 0.75 I 6 (x = 0.75) and from 3.865 eV for Cs2HfI6 2 HfI 6 (x = 0) to 1.871 eV for Cs 2 Hf 0.25 Ti 0.75 I 6 (x = 0.75) taking into consideration spin-orbit coupling (SOC). The band gap reduction enables the absorption to reach 105 5 cm_ _ 1 more than in the visible region, especially for Cs 2 B 0.25 Ti 0.75 I 6 (B = Hf and Zr) doped. Furthermore, from the enthalpy of formation, all structures studies are thermodynamically stable, as well as can produce hydrogen by splitting water. With all of these results, we are expecting Cs2B1_xTixI6 2 B 1 _x Ti x I 6 (B = Zr, Hf) doped compounds to be employed as semiconductors in photovoltaic and photocatalytic devices.