1 Introduction

Hydrogen peroxide (H2O2) has a high energy density per unit volume since it is a liquid at ambient temperature and pressure. It has been extensively applied in the areas of power generation and pollutant removal as a promising fuel and green oxidant. Furthermore, it is a universal and green redox agent for selective organic conversions, preparation of detergents, bleaching (paper bleaching, textile bleaching), etc. [1,2,3,4]. The major large scale production methods for hydrogen peroxide in practice include autoxidation of anthraquinone, oxidation of alcohols and electrochemical synthesis [5,6,7]. Nevertheless, since these methods consume large quantities of energy and organic solvents, they can hardly be regarded environmentally friendly. Furthermore, hydrogen peroxide produced by these systems may contain organic impurities [8]. Consequently, the development of effective, economic and green technologies to produce hydrogen peroxide is highly desirable. H2O2 production by semiconductor-based photocatalysis has recently gained much attention with regard to sustainable energy and environmental issues. Photocatalytic hydrogen peroxide production, in which enough and renewable sunlight is as the driving force, needs no hydrogen and may be a safe and environmentally benign method [8]. Various semiconductors such as bismuth tungstate, gold nanoparticles supported on bismuth vanadate, tungsten trioxide, graphitic carbon nitride and titanium dioxide have been applied in the photocatalytic and photoelectrochemical hydrogen peroxide production [9,10,11,12,13,14,15,16,17]. Low cost, high catalytic activity, good efficiency, good stability, non-toxic and non-corrosive nature, and outstanding physical and chemical properties have made titanium dioxide (TiO2) an interesting photocatalyst [18,19,20,21,22,23]. The most conventional photocatalyst is TiO2 nanotube (TNT). Nanotubular structures of TiO2 have been of great interest. They consist of vertically oriented and highly ordered nanotubes, rendering them high surface area-to-volume ratio, enhanced electron transport velocity and charge separation efficiency, and reduced charge recombination rate. Thus, these compounds are ideal photoelectrocatalysts [20, 24, 25]. The mechanism of photocatalysis on TiO2 surfaces is based on UV light absorption and e/h+ pair generation, followed by the generation of highly oxidizing radicals. Only UV irradiation can generate an important photoresponse given the relatively large band gap of TiO2 (anatase, ∼3.2 eV). Sun rays contain only a small fraction of UV light and a larger fraction of visible light (5 and 45%, respectively) [20, 25]. Thus, the improvement of the optical absorption and charge separation is essential to enhance the photocatalytic activity. Doping methods, which shift the activity of TNT from the UV to the visible region, are also used to improve its photocatalytic activity [24,25,26]. Many methods to enhance the photoactivity of TiO2 including metal and non-metal doping or codoping have thus far been studied. The visible light absorption of TiO2 can be extended by codoping with both cations and anions, according to different reports. The VB edge of TiO2 is remarkably improved by codoping of TiO2 with molybdenum and carbon, as charge compensated donor–acceptor pairs, while leaving the CB edge fixed [27]. Codoping of nitrogen with other metals has also been widely investigated. A clear red shift of the absorption edge and better hydrogen production activity were shown by indium and nitrogen codoped TiO2 samples in comparison with indium doped TiO2, nitrogen doped TiO2 or undoped TiO2 [28]. Cerium and nitrogen codoped TiO2 showed a more clear red shift of TiO2, which was 20 times higher the hydrogen evolution activity of undoped TiO2 [29]. Nitrogen and chromium, nickel, iron, and platinum metal codoped TiO2 were systematically studied by Selcuk and co-workers, who found that the highest H2 production activity under visible light irradiation was shown by nickel and nitrogen codoped TiO2 [30]. Li et al. reported intense visible light absorption by gallium and N codoped TiO2 [31]. Two major advantages of codoping of TiO2 are the reduction of the recombination processes of the photogenerated charges and enhancement of the visible light absorption.

Photoelectrochemical, photocatalytic and electrochemical methods based on doped and codoped TiO2 nanotubes, as visible light photoactive materials, in the formation of hydrogen peroxide have been compared in this work. The photocatalytic preparation of hydrogen peroxide using TiO2-based photocatalysts has attracted remarkable interest due to its suitability to reduce oxygen to hydrogen peroxide [32,33,34]. For example, surface fluorination of TiO2 was shown to increase the H2O2 production rate by Maurino et al. [34]. Tsukamoto et al. reported that the surface deposition with Au–Ag alloy could enhance the H2O2 production rate by TiO2 [32]. Although it can be efficiently produced by TiO2 or modified TiO2 in the presence of oxygen under UV light irradiation, H2O2 is subject to self-decomposition by UV light [35]. Thus, the design and development of visible light active photocatalysts, which can effectively produce H2O2 while inhibiting the decomposition process, is necessary. Few researchers have thus far concentrated on H2O2 formation via photoelectrochemical, photocatalytic and electrochemical methods by visible light responsive photocatalysts based on TiO2 nanotubes. A novel, one-step electrochemical anodization process has been suggested to enhance the photocatalytic activity of titania nanotubes by doping iron, sulfur and Fe/S codoping. Some studies demonstrated that in sulfur (S) and iron (Fe) codoped materials, charge separation between electrons and holes is improved [36, 37]. Hamadanian et al. prepared titanium oxide photocatalysts codoped with iron and sulfur via modified sol–gel method. Evaluation of photocatalytic activity of prepared samples in photocatalytic oxidation of methyl orange (MO) and methylene blue (MB) showed that iron, sulfur codopant pairs can narrow the band gap and effectively modify the electronic structures of titanium oxide [38]. The S and Fe single and codoped titanium oxide nanocrystals were prepared by Christoforidis et al., using a new microemulsion method. They observed that Fe/S-codoped titanium oxide nanomaterials have higher photocatalytic activities for gas-phase oxidation of toluene than the single Fe-doped titanium oxide and the commercial titanium oxide (P25) under both sunlight and UV-light irradiation [39]. Fe and S codoped titanium oxide photocatalysts showing excellent photocatalytic degradation of phenol were prepared via a sol–gel process and low-temperature solvothermal method by Niu et al. They observed that compared with undoped titanium oxide and S-doped titanium oxide samples, sulfur and iron codoped titanium oxide photocatalysts had much higher photocatalytic activity for phenol degradation under visible light irradiation [40]. Cheng et al. synthesized Fe–N-S-tridoped titanium oxide by one step sol–gel reaction in the presence of ammonium ferrous sulfate, and used the prepared catalysts for the degradation of phenol under visible light irradiation. Their results showed that Fe–N-S-tridoped titanium oxide had a higher visible light photocatalytic activity than that of nitrogen doped titanium dioxide and P25 titanium dioxide. The high crystallinity, narrow band gap, the intense light absorption in visible region and high separation efficiency of photoinduced charge carriers were responsible for improving visible light photocatalytic activity [41]. To the best of the authors’ knowledge, the in situ codoping of titanium dioxide nanotubes with iron and sulfur by single step anodization has not yet been reported. Various physical and chemical techniques were used to characterize the samples prepared. The impacts of doping and codoping on the photocatalytic and photoelectrochemical activity of the TiO2 nanotubes prepared and the formation of H2O2 were then systematically explored. The activity of TiO2 nanotubes for H2O2 production was improved by doping or codoping with iron and sulfur, according to the results obtained. As far as we know, the Fe/S-codoped TiO2 nanotubes has not yet been applied in the photoelectrochemical, photocatalytic and electrochemical hydrogen peroxide production.

2 Experimental

2.1 Synthesis of photoelectrodes

Doped and codoped photoelectrodes were prepared by one-step anodization in a two electrode configuration bath consisting of Ti sheet and Pt as the anode and counter electrode, respectively. The electrolytes were mixtures of ethylene glycol (EG), ammonium fluoride (NH4F) and distilled water containing various concentrations of potassium ferricyanide and potassium disulfite, as Fe and S dopant sources [20, 42, 43]. The anodizing voltage was set to 60 V and the anodization was carried out at ambient temperature for 6 h. The samples were finally calcined at 400 °C for 120 min at heating and cooling rates of 2 °C min−1. The Fe, S, and Fe-S-codoped TiO2 catalysts were denoted as FexSyTNT (x and y are the potassium ferricyanide/potassium disulfite ratios in the electrolyte). The experimental conditions for the syntheses are shown in Table 1.

Table 1 Experimental conditions for the preparation, sample labels and characterization of prepared nanotubes

2.2 Characterization

A field-emission scanning electron microscope (FE-SEM, Philips XL30, Netherlands) and energy dispersive X-ray (EDX) mapping port were used to investigate the topography and elemental composition of the nanotubes formed. Transmission electron microscopy (TEM) was used to analyze the samples prepared using a Philips-EM-208S transmission electron microscope. TEM studies were carried out at the accelerating voltage of 100 kV. An X-ray diffractometer (Bruker, Germany) with a Cu kα source (λ = 0.154 nm, 60 kV) in the range of 20–80° was used to perform X-ray diffraction (XRD) measurements.

A quartz cell with a magnetic bar at the bottom containing a 0.1 M potassium hydrogen phthalate aqueous solution (pH = 3.9) was used to carry out the photocatalytic tests for hydrogen peroxide production. Photocatalyst films with dimensions of 1 cm × 1 cm were thus prepared. Oxygen or nitrogen was used to purge the solution for 15 min before the experiments and throughout the irradiation with a 35 W xenon lamp (light intensity: 200 mW/cm2).

The photoelectrochemical tests for H2O2 preparation were carried out using a three electrode electrochemical cell with a quartz window. The nanotubes formed, Ag/AgCl with saturated KCl and Pt foil served as the working, reference and counter electrodes, respectively. Open-circuit potential and photocurrent were measured in a 0.1 M aqueous solution of potassium hydrogen phthalate (pH = 3.9) at ambient temperature. A 35 W xenon lamp (200 mW/cm2) was used as the light source. The solution was saturated by oxygen or nitrogen for at least 15 min. An Origaflex electrochemical working station (OGF500 potentiostat/galvanostat, France) was used to perform the photoelectrochemical experiments. The photocatalyst was removed and H2O2 concentration was determined by titration with potassium permanganate at certain time intervals [44, 45].

3 Results and discussion

The morphology of the resulting anodized samples was studied. The microscopic morphology of nanotube array samples was investigated by FE-SEM. The top view SEM image of the TNT arrays prepared (Fig. 1a–f) clearly shows the uniform distribution of the nanotube structures on the surface of titanium substrates and their vertical alignment with a regular and highly ordered morphology. The SEM images of undoped TNT are shown in Fig. 1a. As clearly observed, uniform and smooth tubular structures were formed following the anodization of Ti. The SEM image also indicated an average diameter of 90–120 nm for the nanotubes. SEM was used to characterize the morphology of the samples following the addition of the dopant sources in the anodizing electrolyte. As observed, the surface of anodized titanium is covered by the nanotubular structures (Fig. 1b–f). The figures show that the nanotube arrays were well formed following the addition of potassium ferricyanide, potassium disulfite or both (different concentrations of dopant sources) to the anodizing bath and no remarkable changes were observed in the morphology of these new films. This indicates that the addition of these salts (as dopant sources) to the anodizing electrolyte under the experimental conditions of this work had no clear impact on the morphology. A perpendicular tube structure is clearly observed for all the anodized samples (Fig. 1). Therefore, the nanotubes are organized in parallel arrays and have a uniform diameter. Table 1 shows the dimensions of the tubes including inner diameter and wall thickness of the TNT prepared, according to the SEM images.

Fig. 1
figure 1figure 1figure 1figure 1figure 1figure 1

FESEM surface morphology images of the prepared nanotubes on titanium plated: a undoped TNT, b Fe-TNT, c Fe3S-TNT, d Fe2S2-TNT, e FeS3-TNT and f S-TNT

The morphology of the Fe/S-codoped TiO2 sample was further analyzed by transmission electron microscopy (TEM). The TEM images of Fe3S-TNT (with the highest photocurrent density among all the samples prepared) further confirm that these samples in fact consisted of true nanotubes with open nanotube edges, providing a large specific surface area to promote photocatalytic reactions. The nanotubes prepared were similarly shaped with an average diameter of ∼110 nm, as shown in Fig. 2. This observation further confirms that the nanotube structures are not changed by the in situ codoping method via one-step anodization. The doped particles, as darker spots, are thus well-dispersed on the nanotube surfaces.

Fig. 2
figure 2

TEM image of Fe3S-TNT sample

The XRD patterns of all the anodized samples are shown in Fig. 3. In the XRD pattern of the undoped TNT, in addition to the peaks corresponding to the titanium substrate, all the diffraction peaks correlate to the anatase TiO2 (JCPDS No: 01–071-1166) and no impurity phase is observed, indicating the pure anatase phase of the TiO2 nanotubes prepared. In the XRD patterns of the Fe-doped and various Fe/S-codoped TiO2 samples, in addition to Ti and TiO2 diffraction peaks, seven crystal peaks are observed at 2θ = 24.1°, 35.6°, 40.9°, 48.2°, 54.2°, 62.3° and 68.8°, corresponding to (0 1 2), (1 1 0), (1 1 3), (0 2 4), (1 1 6), (2 1 4) and (2 0 8) planes of pure hematite structure of Fe2O3, respectively (JCPDS card No: 00–001-1053). In addition, no other diffraction peaks associated with the impurity are observed, indicating the high purity of all the samples prepared. The elemental composition and distribution mapping obtained from EDS measurements (Figs. 4, 5, 6) were used to study the elemental composition of the samples and verify the presence of sulfur dopants in the S-doped and codoped samples. The undoped TNT consisted of Ti and O elements and the S-TNT sample was composed of Ti, O and S elements (Figs. 4 and 5, respectively), according to the EDS spectra. The presence of sulfur in the nanotubes prepared was confirmed by the elemental mapping images and EDX spectra of the S-TNT and Fe3S-TNT samples. In addition, the homogeneous distribution of all the elements on the nanotube surfaces was confirmed by the analysis. The homogeneous doping of Fe and S over the entire thin films prepared could be confirmed by the uniform distribution of Fe and S. Figures S1 and S2 show the EDX elemental mapping of other codoped samples, confirming the presence of Fe, S, Ti and O in these samples. This further confirms the XRD results, which indicate the successful preparation of doped and codoped titanium dioxide by in situ anodization.

Fig. 3
figure 3

X-ray diffraction patterns of various prepared nanotubes

Fig. 4
figure 4

EDX spectrum and EDX mapping of undoped TNT sample

Fig. 5
figure 5

EDX spectrum and EDX mapping of S-TNT sample

Fig. 6
figure 6

EDX spectrum and EDX mapping of Fe3S-TNT sample

Hydrogen peroxide production is dependent on the amount of photogenerated electrons because these electrons are required to reduce O2. Therefore, the photoelectrochemical (PEC) performance of the samples obtained is very significant. Chronoamperometric curves were used to record the photocurrent performance measurement of the samples prepared. The photocurrent density vs. time of the samples prepared was tested for 150 s, the time interval between the light on off being 20 s in 0.1 M potassium hydrogen phthalate aqueous solution at a constant potential of 0.74 V vs. Ag/AgCl using xenon lamp as the light source (Fig. S3). It must be pointed out that the active area of all the photoelectrodes was 1 cm2. Upon switching the light on, the transient photocurrent of all the samples was produced and immediately increased to the maximum value, as shown in the figure. This is mostly due to the continuous accumulation of the photoexcited electrons on the photoelectrode surface. Needless to say, the separation capabilities of photogenerated electron–hole pair (e/h+) play a very important part in photocatalytic (PC) activity, suggesting the better separation efficiency of photogenerated electron–hole pairs by larger photocurrents. In addition, the transient photocurrent quickly decreased upon switching the light off due to the recombination of the photogenerated electron–hole pairs. This fast increase and decrease in the photocurrents indicate the very quick transport of the carrier in the samples prepared. It can be clearly observed that acceptable repeatability and stability are shown by all photoelectrodes after several light cycles of an interrupted light irradiation. Furthermore, the transient photocurrent intensity of doped and Fe/S-codoped photoelectrodes was clearly higher compared with that of TNT photoelectrode, indicating the enhancement of the separation efficiency of photoinduced charge carriers and higher PC activity of the doped and codoped photoelectrodes. The photocurrent densities of TNT, Fe-TNT, S-TNT, Fe3S-TNT, Fe2S2-TNT and FeS3-TNT were 11, 92, 22, 130, 33 and 61 µA/cm2, respectively. The best Fe/S-codoped TNT electrode (sample Fe3S-TNT) showed a photocurrent density 13 times that of the pure TNT electrode. The Fe/S-codoped TNT sample is expected to generate more photoelectrons to reduce O2 molecule in comparison with the undoped TNT sample.

Open-circuit potential (OCP) measurements were used to study the photoactivity under light irradiation of the samples prepared in 0.1 M potassium hydrogen phthalate solution at pH 3.9 in the dark and light irradiation (Fig. S4). The conductivity type of the electrodes (n or p-type) was determined by the OCP measurement. The value shifted to negative (positive) potential, indicating an n-type (p-type) conductivity of the semiconductor. As observed in Fig. S4, the open-circuit potential vs. time curve for the samples was tested for 300 s, the light on and off time intervals being 50 s. Charge carriers were generated upon the illumination of semiconductor with energy greater than or equal to its band gap value. The potentials of all samples were shifted to less positive values under these conditions, indicating the n-type behavior of the semiconductor. Photogenerated holes are automatically driven to semiconductor/electrolyte interface to perform oxidation reactions and the electrons are accumulated in the conduction band (CB) of TiO2. Considering the photopotential as the difference between the potentials under illumination and in the dark (ΔOCP), ΔOCP value for the doped and codoped samples increased in comparison with the undoped TNT (Fig. S4). In addition, the ΔOCP reached a maximum value for codoped TNT photoelectrode (sample Fe3S-TNT). This can be attributed to the higher population of photogenerated electrons in Fe3S-TNT sample resulting from less recombination. Therefore, the in situ doping or codoping of S and W improved the photocatalytic activity of nanotubes. Abundant electrons and holes react with other substances to generate numerous active species such as O2, OH groups and H2O2 due to the effective separation of photoinduced charge carriers. Thus, the photoelectric catalytic activity was remarkably enhanced, according to the results.

The photoelectrocatalytic properties of the samples prepared can be effectively determined by cyclic voltammetry (CV). Figure 7 shows the results of CV tests of Fe3S-TNT carried out in an aqueous 0.1 M solution of O2 and N2 saturated potassium hydrogen phthalate at a scan rate of 20 mV s−1 in the dark and under light illumination. Under illumination, the peak current densities for both O2 and N2 saturated increased (Fig. 7a, b). A small current was observed in the dark. Upon exposure to light, the rate of the production of photogenerated electron hole pairs is shown by current values. Oxygen reduction is clearly dependent on the specifications of the photocatalyst used given the remarkably different current magnitudes between dark and light conditions. Therefore, hydrogen peroxide generation by O2 reduction in the presence of the photocatalysts prepared is electrochemically facile upon exposure to light. The photoelectrocatalytic performance of Fe3S-TNT sample was investigated in 0.1 M potassium hydrogen phthalate aqueous solution by recording cyclic voltammograms (CV) in the absence and presence of oxygen saturation at a scan rate of 10 mV/s. Figure 7c shows the corresponding cyclic voltammograms for Fe3S-TNT. Higher current density was observed in the presence of oxygen, which indicates the significance of the presence of oxygen in the environment (test solution). Figure 7d shows the comparison of the photoelectrocatalytic activities of Fe3S-TNT and S-TNT samples using cyclic voltammograms in the presence of oxygen under light illumination at a scan rate of 10 mV/s. As observed, under illumination, the Fe3S-TNT sample (codoped material) exhibited much higher current densities compared with the S-TNT sample, indicating that codoping is better and more efficient than TNT doping. The anodic photocurrent densities of the S-TNT and Fe3S-TNT electrodes were 0.037 and 0.13 mA/cm2, respectively.

Fig. 7
figure 7figure 7

ac Cyclic voltammograms of Fe3S-TNT sample obtained in in N2 saturated and O2 saturated 0.1 M potassium hydrogen phthalate solutions at a scan rate of 10 mV/s in dark and light conditions. d CV curves of S-TNT and Fe3S-TNT samples obtained in the presence of oxygen at a scan rate of 10 mV/s in a 0.1 M potassium hydrogen phthalate solution under light condition

No hydrogen peroxide was produced in the absence of either photocatalyst or light, according to the control experiments. Evidently, the rate of hydrogen peroxide production on the prepared samples in all the cases is almost constant, indicating constant H2O2 production by the photocatalyst without any loss of catalytic activity and no appreciable decomposition of the product. The time course of H2O2 formation on the prepared photoelectrodes under different conditions is shown in Fig. 8:

  • Photocatalytic (PC) process: single light irradiation on the photoanode, but no applied bias

  • Electrocatalytic (EC) process: only external bias voltage applied on photoanodes prepared in the absence of light irradiation

  • photoelectrocatalytic (PEC) process: with both light irradiation and bias voltage on these photoanodes

Fig. 8
figure 8

H2O2 production on the prepared photoelectrodes under different conditions: a electrocatalytic process, b photocatalytic process and c photoelectrocatalytic process

H2O2 production in all samples slowly increased with extended reaction time, as shown in Fig. 8. It is noteworthy that the yield of H2O2 produced over new doped and codoped photoelectrodes in the same light irradiation time was much higher than that over undoped TNT sample. As observed in this figure, the comparison of the two doped materials (iron or sulfur doped TNT) clearly indicates the higher efficiency of Fe-TNT compared with S-TNT. Sample Fe3S-TNT was certainly more active in the photoreduction of O2 to H2O2. In fact, sample Fe3S-TNT was 5 times more active than undoped TNT. Small quantities of H2O2 were observed when only the anodic potential of 0.74 V vs. Ag/AgCl was applied on the prepared photoelectrodes by electrocatalytic process. Only 5.1 mmol dm−3 h−1 H2O2 was detected over the Fe3S-TNT sample in the photocatalytic (PC) process due to the production of a few photogenerated electrons (Fig. 8b). The simultaneous application of a bias potential of 0.74 V and light irradiation remarkably increased H2O2 production (8.1 mmol dm−3 h−1 for Fe3S-TNT)) compared with PC and EC processes [46]. These results indicate that anodic bias potential helps produce many more photogenerated electrons (Fig. 8c). It can be stated that the photogenerated electrons and holes move in the opposite direction under an external electric field. Therefore, they promote their spatial separation and inhibiting recombination. Consequently, in photoelectrocatalytic (PEC) hydrogen peroxide production, the recombination of photogenerated electron–hole pairs is reduced, and more electrons are available for the reduction of oxygen to yield hydrogen peroxide. The dependence of hydrogen peroxide concentration on time during PC, EC and PEC production of H2O2 on Fe3S-TNT sample in both cases of oxygen and nitrogen saturation is shown in Fig. 9. The highest H2O2 yield was obtained in the presence of oxygen, which indicates the necessity of oxygen for the generation of H2O2. The resulting H2O2 concentrations are well-associated with those obtained from the CV curves.

Fig. 9
figure 9

Concentration of generated H2O2 on the Fe3S-TNT sample under different conditions; (a) EC, (b) PC and (c) PEC

In order to explain the enhanced visible-light-activity of these Fe-S codoped TiO2, it can be said that with the substitution of O atoms by sulfur S(IV) and Ti4+ by iron Fe(III) in the lattice of titanium oxide, new dopant energy levels (new impurity levels) were introduced between the valence band and conduction band of titanium oxide (band gap of titanium oxide), leading to a narrower band gap of Fe-S codoped TiO2 catalysts. As shown in Fig. 10, under visible light irradiation by using these new Fe-S-codoped TiO2 cocatalysts, photoinduced electron transfer (PET) processes could be occurred from following pathways [47,48,49,50,51,52]:

  1. 1.

    Electrons can be promoted from new valence band introduced by sulfur dopant impurity (localized energy levels of S dopant lying above the valence band) to conduction band of titanium oxide

  2. 2.

    Electrons can be promoted from sulfur energy level to iron energy level (from lower to the higher impurity levels induced by these impurities)

  3. 3.

    Electrons can be promoted from valence band of titanium oxide to the new conduction band introduced by iron dopant (energy level of this impurity)

Fig. 10
figure 10

Possible scheme of photocatalytic mechanism of undoped TNT and Fe-S codoped TiO2 after activation by light

Therefore, Fe-S codoped titanium oxide photocatalysts have narrower band gap than pure titanium oxide, so more photons from visible irradiation are utilized to generate photo-generated electrons and holes.

4 Conclusions

To sum up, Fe-doped, S-doped and Fe/S-codoped TiO2 nanotubes with different morphologies have been successfully synthesized using a one-step anodization method. The structural, morphological, and photoelectrochemical characteristics of the prepared TNT were systematically determined prior to the application studies. The presence of anatase phase in all the undoped, doped and codoped titania is shown by the XRD results. The molar ratio of the dopant sources in anodizing electrolyte strongly affected the PEC properties. The doped and codoped samples were observed to show higher photocurrent responses under xenon light irradiation compared with the undoped TNT. The highest photocurrent density of codoped TNT (Fe3S-TNT) was about 130 µA/cm2, which is 13 times that of pristine TNT (11 µA/cm2). The hydrogen peroxide production capacity of pristine TiO2 nanotubes by photocatalytic and photoelectrochemical processes was considerably improved in their codoped species. The trend in H2O2 production by the TiO2-based species was Fe3S-TNT > Fe-TNT > FeS3-TNT > Fe2S2-TNT > S-TNT > pristine TNT. Anodic oxidation of titanium foils under optimal electrolytes and anodizing conditions is a possible method to prepare effective, cheap, doped and codoped TiO2-based recyclable nanotube photocatalysts for various photocatalytic applications.