Through first-principles calculations we study the electronic structures and optical properties of two-dimensional (2D) Sn[Formula: see text]Ti(Zr)[Formula: see text]S2 alloys. The results indicate that the band gap value of Sn[Formula: see text]Ti(Zr)[Formula: see text]S2 alloys is decreased continuously when Ti(Zr) concentration is increased, which is very beneficial to optoelectronic devices applications. Moreover, the static dielectric constant is increased when the Ti(Zr) concentration is increased in the 2D Sn[Formula: see text]Ti(Zr)[Formula: see text]S2 alloys. In addition, we also calculate the imaginary part [Formula: see text] dispersion of Sn[Formula: see text]Ti(Zr)[Formula: see text]S2 alloys along the plane with different Ti(Zr) concentrations. The threshold energy values decrease with increasing Ti(Zr) concentrations in the Sn[Formula: see text]Ti(Zr)[Formula: see text]S2 ternary alloys. Moreover, the calculations of formation energy also indicate that these 2D alloys can be fabricated under some experimental conditions. These results suggest that Ti(Zr) substituting Sn atom is an efficient way to tune the band gap and optical properties of 2D SnS2 nanosheets.