In two-dimensional materials research, oxidation is usually considered as a common source for the degradation of electronic and optoelectronic devices or even device failure. However, in some cases a controlled oxidation can open the possibility to widely tune the band structure of 2D materials. In particular, we demonstrate the controlled oxidation of titanium trisulfide (TiS3), a layered semicon-ductor that has attracted much attention recently thanks to its quasi-1D electronic and optoelectron-ic properties and its direct bandgap of 1.1 eV. Heating TiS3 in air above 300 °C gradually converts it into TiO2, a semiconductor with a wide bandgap of 3.2 eV with applications in photo-electrochemistry and catalysis. In this work, we investigate the controlled thermal oxidation of indi-vidual TiS3 nanoribbons and its influence on the optoelectronic properties of TiS3-based photodetec-tors. We observe a step-wise change in the cut-off wavelength from its pristine value ~1000 nm to 450 nm after subjecting the TiS3 devices to subsequent thermal treatment cycles. Ab-initio and many-body calculations confirm an increase in the bandgap of titanium oxysulfide (TiO2-xSx) when in-creasing the amount of oxygen and reducing the amount of sulfur