Chemical bath deposition (CBD) was used to prepare titanium dioxide (TiO2) thin films on glass substrates. The TiO2 thin films were created, and the Scanning Electron Microscope (SEM) images showed that they developed as nanoflowers and tiny semi-nanoplate bundles that grew vertically onto the surface of the substrates with uniform distribution. The nanoplate ranges in length from 26 to 149 nm and the average thickness was between 13 and 228 nm. The prepared TiO2 nanoflower thin films have an energy band gap of 3.26 eV, according to optical characteristics. Using various pH values and UV light exposure durations, the photocatalytic activity of the produced TiO2 nanoflower thin films was examined against the methylene blue (MB) dye at room temperature.When irradiation duration and pH were increased, the photodegradation rate of MB dye also increased. After 240 minutes of exposure, the photodegradation rate of MB dye with pH values of 6, 8, 9, 10, and 11 was 51%, 64%, 79%, and 82%, respectively. The kinetic rate constant for photocatalytic degradation of MB dye was determined to be 0.0069, 0.0061, 0.0038, and 0.0028 min− 1 for pH values of 11, 9, 8, and 6, respectively.