Introduction

Hydrogen peroxide (H2O2) is one of the most essential basic chemicals for synthetic industry, environmental remediation, and medical disinfection, with an annual global demand of 4.4 million tons and a market size of USD 3.2 billion in 20221,2. During the recent COVID-19 pandemic, its demand has risen substantially owing to its wide use in the formulation of disinfectant products3. At present, over 95% of commercial H2O2 is manufactured through the well-established anthraquinone oxidation process in centralized plants, involving substantial energy consumption and waste emission4. It generally yields highly concentrated H2O2, whose storage, transportation, and handling may pose significant safety risks. On many occasions, however, end-users only need dilute H2O2 solution: for example, <0.1 wt% (or ~30 mM) H2O2 is usually sufficient for water treatments and antibacterial purposes5,6. This notable gap between production and consumption stimulates us to search for alternative processes to enable the on-site, on-demand production of dilute H2O2 solution7,8.

Solar-driven H2O2 photosynthesis from oxygen and water has emerged as a promising route9,10,11. It uses solar energy as the sole energy input and generates no waste chemicals throughout the reaction process. Over recent years, a variety of photocatalysts have been developed with many exciting progresses12,13,14,15. They, unfortunately, have been predominantly investigated in laboratory-scale single-phase batch reactors, in which catalyst powders are dispersed in an O2-saturated aqueous solution (Fig. 1a)14,16. While such a batch configuration is easy to operate and permits quick catalyst screening, its often limited size (solution volume <50 mL) and H2O2 production rate (<100 μmol h−1) are far from amenable to practical applications17. Moreover, all the batch reactors only operate intermittently, and necessitate repetitive catalyst separation and recycling at intervals as short as a few hours to extract H2O2 solution, resulting in low productivity and added expenses. Several attempts have been made to address this limitation. For example, biphasic batch reactors containing liquid water and oil phases have been shown to facilitate the spontaneous separation and collection of H2O218,19. Supporting photocatalyst powders on porous hydrophobic substrates floating on the solution surface creates abundant triple-phase boundaries, and promotes O2 mass transfer and hence H2O2 production20,21. Despite some performance gains, none of them could enable the continuous photosynthesis and extraction of H2O2 at practically meaningful concentrations for directly connecting to the end users.

Fig. 1: Schematic illustration of the reaction systems for photocatalytic H2O2 production.
figure 1

a Previously reported photocatalytic systems for H2O2 production including the monophasic system, H2O-oil biphasic system, and gas-solid-liquid triphasic system. The colors yellow, blue, and pink represent the photocatalyst, water phase, and oil phase, respectively, while the gray grids denote the hydrophobic support. b Biphasic fluid system that enables continuous H2O2 photosynthesis, separation, and extraction. The colors yellow, blue, and pink represent the photocatalyst, water phase, and oil phase, respectively.

We envision that a biphasic fluid system represents a promising solution to the above challenge (Fig. 1b). Fluid reactors have the demonstrated potential for the continuous electrosynthesis or photosynthesis of a variety of valuable chemicals22,23,24,25,26. The introduction of biphasic water-oil reaction solution within fluid systems may benefit spontaneous H2O2 separation while being continuously produced. To achieve so, desirable photocatalyst materials should have strong surface hydrophobicity in order to be stably and selectively dispersed in organic phases. Covalent organic frameworks (COFs)—a class of crystalline and porous polymer semiconductors—are appealing candidates by virtue of their versatile structural diversity, and tunable optoelectronic and surface properties27,28,29,30,31. Their interactions with solvents could, in principle, be modified by incorporating proper functional building blocks32. Based on the above reasoning, we here prepare a superhydrophobic COF photocatalyst via a judiciously designed Schiff-base reaction between tritopic amine and tetratopic aldehyde monomers. Their symmetry mismatch leaves periodical uncondensed aldehyde sites, which are subsequently grafted with perfluoroalkyl chains to afford the product with superhydrophobicity. This surface property allows the photocatalyst to be stably dispersed in the oil phase within a biphasic fluid photo-reactor. By properly adjusting reaction parameters, we achieve continuous production and extraction of pure H2O2 solution with an exceptional production rate of up to 968 μmol h−1 and tunable H2O2 concentrations from 2.2 to 38.1 mM. As-prepared H2O2 solution can be used for household disinfection and environmental remediation.

Results

Preparation and characterizations of BTTA-COF and PF-BTTA-COF

As schematically illustrated in Fig. 2a, our catalyst was prepared through a [4+3] Schiff-base condensation reaction between 5,5’-(benzo[c][1,2,5]thiadiazole-4,7-diyl)diisophthalaldehyde (BTDIPA) and 2,4,6-tris(4-aminophenyl)-1,3,5-triazine (TAPT) under a solvothermal condition (see the synthetic details in the Supplementary Information). The as-prepared sample from this step is denoted as BTTA-COF. Previous studies indicated that benzothiadiazole (BT) and triazine moieties favored the two-electron oxygen reduction reaction (2e ORR)33,34,35. Their abundant incorporation into polymeric frameworks is expected to accelerate H2O2 photosynthesis. Moreover, the symmetry mismatch between tritopic amines and tetratopic aldehydes leaves uncondensed aldehyde sites after the reaction, which could be subsequently functionalized with other molecules for regulating the photocatalyst surface wettability. Here in order to afford BTTA-COF with superhydrophobicity, its unreacted aldehyde sites were further condensed with 1H,1H-undecafluorohexylamine (UFHA) via the Schiff-base reaction. The final product is denoted as PF-BTTA-COF to reflect its perfluoroalkyl functionalization.

Fig. 2: Syntheses, characterizations, and batch photocatalysis experiments of BTTA-COF and/or PF-BTTA-COF.
figure 2

a Schematic synthetic procedure for BTTA-COF and PF-BTTA-COF. b FT-IR spectra of BTTA-COF, PF-BTTA-COF, and TAPT. c XRD patterns of BTTA-COF and PF-BTTA-COF. d TEM image of PF-BTTA-COF. e Water or α,α,α-trifluorotoluene (TFT) contact angle measurements of BTTA-COF and PF-BTTA-COF as well as the photograph showing their dispersion in biphasic H2O-TFT mixture. f Time-dependent H2O2 evolution on BTTA-COF within batch reactors of two different sizes while retaining the same catalyst concentration.

The molecular structures of both samples were interrogated by spectroscopic characterizations. In the Fourier-transform infrared (FT-IR) spectrum of BTTA-COF, the emergence of the signature imine signal at 1627 cm−1 attests to the successful condensation between monomers (Supplementary Fig. 1a)36. Its moderate signal at 1696 cm−1 indicates the existence of uncondensed aldehyde sites owing to the monomer symmetry mismatch as explained above, while no unreacted amine signal is noted in BTTA-COF (Fig. 2b)37,38. The molar percentage of residual aldehydes is estimated to be 15%, close to the theoretical value (Supplementary Fig. 2a–c). The subsequent introduction of perfluoroalkyl functionalities in PF-BTTA-COF does not disrupt the overall molecular structure (Supplementary Fig. 1b). New peaks, however, are observed at 1237 cm−1 and 1201 cm−1 assignable to the C-F bonding in PF-BTTA-COF, and the signal intensity of uncondensed aldehydes significantly attenuates after modification, evidencing that perfluoroalkyl groups are successfully grafted to the polymeric frameworks39. Energy-dispersive X-ray spectroscopy (EDS) analysis reveals a fluorine content of 5.3 wt%, indicating that around one-third of unreacted aldehydes are modified by UFHA (Supplementary Fig. 2d, e)40,41. The condensed molecular structure and incorporation of perfluoroalkane are also corroborated by the solid-state 13C (Supplementary Fig. 3a) and 19F nuclear magnetic resonance (NMR) results (Supplementary Fig. 3b).

Both BTTA-COF and PF-BTTA-COF feature great structural crystallinity. Their X-ray diffraction patterns (XRD) exhibit intense peaks that can be simulated by the eclipsed (AA) stacking of two-dimensional (2D) molecular layers (Fig. 2c and Supplementary Fig. 4). The strongest signal at 2θ = 6.1° corresponds to the (100) diffraction and evidences the in-plane ordering with a d-spacing of 14.4 Å—close to the pore-to-pore distance of the proposed structure (14 Å). N2 sorption isotherms reveal their microporous nature (Supplementary Fig. 5a). The Brunauer‐Emmett‐Teller (BET) specific surface area is calculated to be 1090 m2 g−1 for BTTA-COF and 462 m2 g−1 for PF-BTTA-COF, with an average pore size of 1.39 and 1.27 nm, respectively (Supplementary Fig. 5b). The decreased surface area and pore size of PF-BTTA-COF result from its pore filling with perfluoroalkane as expected. Furthermore, scanning electron microscopy (SEM) imaging shows the rod-like morphology of both samples (Supplementary Fig. 6). High-resolution transmission electron microscopy (TEM) imaging unveils clear lattice fringes and supports their long-range structural ordering (Fig. 2d and Supplementary Fig. 7). Thermogravimetric analysis (TGA) under N2 evidences the excellent thermal stability of both samples up to 500 °C (Supplementary Fig. 8).

Surface hydrophobicity is a prerequisite to the catalyst design for biphasic H2O2 photosynthesis18. To investigate the effect of perfluoroalkyl functionalization, water contact angle (CA) measurements were conducted. As shown in Fig. 2e, unmodified BTTA-COF exhibits a static water CA of 31.4°, while the CA value is dramatically increased to 151.2° for PF-BTTA-COF. When α,α,α-trifluorotoluene (TFT)—a commonly used water-immiscible organic solvent—is dropped onto the surface of PF-BTTA-COF, the organic solvent quickly spreads and is absorbed in less than a second. These results reflect the superhydrophobicity and superoleophilicity of PF-BTTA-COF as a result of perfluoroalkyl functionalization. Thanks to this unique surface property, when its powder is added to an immiscible H2O-TFT mixture, PF-BTTA-COF immediately migrates to and becomes stably dispersed in the oil phase, forming a clear oil-water boundary. Such a feature is essential to the continuous H2O2 production and extraction in our biphasic fluid system, as will be shown later. By sharp contrast, unmodified BTTA-COF does not form selective dispersion and can be suspended in both water and TFT.

We also examined the optoelectronic properties of our samples. The ultraviolet-visible (UV-Vis) diffuse reflectance spectrum of BTTA-COF displays an adsorption onset at 550 nm (Supplementary Fig. 9a). This corresponds to an optical band gap (Eg) of 2.58 eV according to the Tauc’s relation. Using Mott-Schottky and ultraviolet photoelectron spectroscopy (UPS) analyses, its conduction band (CB) and valence band (VB) positions are estimated to be −0.57 V and 2.01 V versus normal hydrogen electrode (NHE), respectively (Supplementary Fig. 9b, c). The incorporation of perfluoroalkyl groups in PF-BTTA-COF does not noticeably modify the optoelectronic property (Supplementary Fig. 10a–c). Based on their electronic structures, both samples are capable of driving simultaneous 2e ORR and 4e water oxidation reaction (4e WOR) (Supplementary Figs. 9d and 10d).

Photocatalytic measurements of BTTA-COF in a batch system

In order to evaluate the potential of our photocatalysts and to make a fair comparison with other competitors under similar conditions, we first conducted photocatalytic measurements of hydrophilic BTTA-COF in a conventional single-phase batch reactor. The catalyst powder was dispersed in 10 mL of pure water at an optimal concentration of 1 g L−1 (Supplementary Figs. 11 and 12, see more photocatalysis details in the Supplementary Information). Under visible light irradiation (λ > 420 nm), BTTA-COF enables H2O2 production and linear accumulation over time, yielding a total amount of 53 μmol after 2 h (Fig. 2f). This corresponds to a H2O2 production rate of 2650 μmol h−1 g−1 or a concentration accumulation rate of 2.65 mM h−1. Control experiments show that H2O2 is predominantly produced through the 2e ORR by photogenerated electrons (Supplementary Fig. 13a). This process involves the formation of both superoxide anion (O2) and endoperoxide (–O–O–) intermediates, as verified by electron paramagnetic resonance (EPR) and in-situ diffuse reflectance infrared Fourier-transform spectroscopy (DRIFTS) analyses (Supplementary Fig. 14), while photogenerated holes are responsible for driving the 4e WOR to O2 (Supplementary Fig. 13b)26,42,43. Moreover, when benzyl alcohol (BA) is introduced as the sacrificial electron donor to accelerate hole consumption under otherwise identical conditions, the H2O2 production rate and concentration accumulation rate are further boosted to 5691 μmol h−1 g−1 and 5.69 mM h−1, respectively (Supplementary Fig. 15). The apparent quantum efficiency (AQE) at 420 nm is measured to be 18% in pure water (Supplementary Fig. 16a) and 37.4% in the presence of BA (Supplementary Fig. 16b). In addition, the solar-to-chemical energy conversion (SCC) efficiency is calculated to be 0.48% in pure water (Supplementary Fig. 17). All these metrics are comparable to other state-of-the-art candidates in pure water or aqueous solutions involving sacrificial electron donors under similar conditions (Supplementary Table 1)19,26,42,43,44,45,46,47,48,49.

BTTA-COF has the required stability for H2O2 photosynthesis in pure water. It shows great compatibility with H2O2, and does not catalyze H2O2 degradation even under visible light irradiation (Supplementary Fig. 18). The cycling photocatalytic experiment demonstrates a negligible activity loss after 6 reaction cycles and a total of 30 h (Supplementary Fig. 19). Characterizations of the catalyst retrieved after the cycling experiment reveal no discernable change in its structure or optoelectronic properties (Supplementary Fig. 20). Note that PF-BTTA-COF exhibits a comparable photocatalytic activity to BTTA-COF under identical reaction conditions, which is expected given their similar optoelectronic properties (Supplementary Fig. 21).

Despite their wide use in photocatalytic measurements, single-phase batch reactors are not amenable to practical applications owing to their limited solution volumes and intermittent operation. We attempted to address the first issue by enlarging the batch reactor and increasing the solution volume to 150 mL (15 times larger) while maintaining the same catalyst concentration and light illumination intensity. Unfortunately, the H2O2 yield does not proportionally increase: the total amount only increases 3 times in pure water, while the normalized H2O2 production rate and concentration accumulation rate are substantially lowered to 0.4 mM h−1 and 400 μmol h−1 g−1, respectively (Fig. 2f). This leads us to conclude that we cannot simply scale up the reaction in batch reactors owing to insufficient light penetration depth and catalyst utilization in large sized reactors50. More importantly, batch reactors are not suitable for continuous H2O2 production and extraction, which we aim for in this study.

Continuous H2O2 photosynthesis and extraction by PF-BTTA-COF in a biphasic fluid system

A biphasic fluid system was developed to address the unavoidable drawbacks of conventional batch reactors. It consists of three main components, as depicted by the photo in Fig. 3a. O2-saturated photocatalyst dispersion in an organic solvent and pure water are co-fed into a T-shaped mixer through peristaltic pumps at controlled flow rates. This generates a series of stable oil-water biphasic segments inside transparent tubular flow channels, which are subsequently transported into a coiled reactor (total channel length ~44 m) irradiated by a set of light-emitting diodes (λ = 455 nm, 25 mW cm−2). During the reaction, the small diameter (~1.6 mm) of flow channels reduces the light penetration path when side-irradiated; the presence of abundant biphasic oil-water interfaces promotes H2O2 extraction from the oil phase to the water phase (Fig. 3b). The oil/water segment lengths and density of the biphasic interfaces could be readily tuned by varying the relative liquid feeding rates (Fig. 3c). After passing through the coiled reactor, the H2O2 solution and photocatalyst dispersion are fed to a collector, where they spontaneously separate into two layers of liquids due to their immiscibility (Supplementary Fig. 22). The upper H2O2 solution is extracted for practical applications, while the lower photocatalyst dispersion is pumped back for subsequent use. Such a biphasic fluid system can continuously yield pure H2O2 solution with tunable concentrations.

Fig. 3: Photocatalytic H2O2 production on PF-BTTA-COF in the biphasic fluid system.
figure 3

a Photographs of the home-built biphasic fluid photocatalytic system in operation. Dashed squares highlight (i) the T-shape mixer for mixing water and oil flows and (ii) spontaneous product separation and collection. b Schematic illustration of H2O2 formation in TFT and migration across the oil-water interfaces. c Typical images of oil-water segments formed inside tubular flow channels at different flow rates and FW/FO ratios. d H2O2 production rate and average solution concentration from the biphasic fluid system at different flow rates (FW = FO). Error bars represent the standard deviations of three independent experiments. e H2O2 production rate and average solution concentration at different FW/FO ratios (FW + FO = 2.12 mL min−1). Error bars represent the standard deviations of three independent experiments. f Performance comparison of PF-BTTA-COF in our biphasic fluid system with those of other state-of-the-art photocatalysts in terms of H2O2 production rate and concentration. Open and filled circles represent the studies in pure water and in the presence of sacrificial electron donors, respectively.

We used superhydrophobic PF-BTTA-COF in the above-developed biphasic fluid system for continuous H2O2 production as a proof of concept. TFT was chosen as the organic solvent in our study considering its excellent wetting of PF-BTTA-COF, complete immiscibility with water, and high oxygen solubility51,52. Our catalyst powder was dispersed in TFT at a concentration of 2 g L−1. When the feeding rates of water (FW) and TFT (FO) are both set at 0.43 mL min−1 to start with, the catalyst retention time inside the coiled reactor is about 100 min, and our biphasic fluid system continuously produces pure H2O2 solution at a rate of 99 μmol h−1 (Supplementary Fig. 23). The introduction of BA in TFT as the sacrificial electron donor further enhances the H2O2 production rate to 318 μmol h−1 and yields H2O2 solution at a concentration of 12.2 mM. Note that BA and its oxidation product benzaldehyde have much higher solubility in TFT than in water, as evidenced by the 1H NMR analysis (Supplementary Fig. 24). This is essential for biphasic H2O2 photosynthesis. As a result, our following optimization is approached in the presence of BA.

We examined the effect of liquid flow rates on photocatalytic activities. Increasing the flow rates is expected to reduce the catalyst retention time in the coiled reactor, and therefore decrease the attainable H2O2 concentration. For example, when both FW and FO are increased to 0.71 mL min−1, the H2O2 concentration is lowered to 9.1 mM; it is further lowered to 6.1 or 3.1 mM at FW = FO = 1.08 or 2.02 mL min−1, respectively (Fig. 3d). Varying the overall flow rate while keeping FW = FO does not significantly change the H2O2 production rate (300 ~ 400 μmol h−1). This is because equal FW and FO values always result in equi-length water and oil segments in tubular flow channels and thereby similar light utilization efficiency. We also investigated the effect of the FW/FO ratio while keeping the same overall flow rate (2.12 mL min−1). At a large FW/FO ratio of 2, the H2O2 production rate is measured to be 363 μmol h−1, and the H2O2 concentration is 4.3 mM (Fig. 3e). Both values improve with decreasing FW/FO ratios due to the enhanced light utilization efficiency by the catalyst dispersed in oil. At the lowest FW/FO ratio of 1/4 (as limited by our peristaltic pumps), the H2O2 production rate and H2O2 concentration are measured to be 616 μmol h−1 and 24.3 mM, respectively. Furthermore, lowering the pH value of the water phase with dilute acid is found to promote H2O2 photosynthesis. For example, the H2O2 production rate of PF-BTTA-COF is boosted to 847 μmol h−1 at pH = 3 and the optimal flow rates, while alkaline pH adversely affects the performance owing to spontaneous H2O2 decomposition under the alkaline condition (Supplementary Fig. 25a)53. At last, rising the BA content in TFT to 50 vol% further enhances the H2O2 production rate and concentration to 968 μmol h−1 and 38.1 mM (0.13 wt%) respectively under the optimal flow rates and water pH (Supplementary Fig. 25b). To our best knowledge, such extraordinary H2O2 production rate is 1 ~ 2 order of magnitude greater than all earlier studies (10 ~ 100 μmol h−1) (Fig. 3f and Supplementary Table 1), thereby unambiguously underlining the unique advantage of our biphasic fluid system34,35,45,48,49,54,55,56,57,58,59.

We next carried out continuous H2O2 photosynthesis using our biphasic fluid system at FW = 1.04 mL min−1 and FO = 2.08 mL min−1. As shown in Fig. 4a, the total H2O2 amount linearly accumulates at the first 80 h, and the increment slightly slows down as the reaction proceeds. After 100 h, more than 35 mmol of H2O2 is produced with an average H2O2 production rate of 357 μmol h−1, eventually giving rise to more than 6 L of H2O2 solution with a concentration of 5.7 mM (Fig. 4b). The collected liquid product can be directly used for multiple applications. Using two bacteria Staphylococcus aureus (S. aureus) and Escherichia coli (E. coli), as examples, we find that their growth is fully inhibited with the application of 5.7 mM H2O2 solution (Fig. 4c and Supplementary Fig. 26). Our product solution can also be employed in wastewater treatment as simulated by the Fenton reaction in the presence of methyl blue (MB) or methyl orange (MO) at practically relevant concentrations (100 ppm)60. Both organic dyes are observed to totally degrade within 30 s after the introduction of 5.7 mM H2O2 solution (Fig. 4d, e and Supplementary Fig. 27). The above results showcase that the dilute H2O2 solution produced from our biphasic fluid system can satisfactorily meet the demands of household disinfection and environmental remediation. The solution could be stored for over 1 month without significant degradation (Supplementary Fig. 28).

Fig. 4: Continuous H2O2 production and extraction for practical applications.
figure 4

a Total amount of H2O2 produced and its concentration change over time during an uninterrupted 100 h test in our biphasic fluid system. b Photographs of the as-obtained H2O2 solution. c Antibacterial tests against S. aureus and E. coli using the as-obtained H2O2 solution. d, e Degradation of d MB and e MO using the as-obtained H2O2 solution, insets are the photographs showing the dye decolorization.

To evaluate the economic feasibility of our biphasic fluid system, we carried out a techno-economic analysis (TEA) based on an amplified reactor device to determine the levelized cost of the product (LCP) and the end-of-life net present value (NPV)61,62. The estimation of the capital and operational costs is based on the prevailing market price of raw materials and products, as summarized in Supplementary Tables 2 and 3. It is found that when the FW/FO ratio is set at 1/4, LCP is most economical (Supplementary Fig. 29a). Assuming a facility lifespan of 10 years, the end-of-life NPV turns profitable by the fourth year (Supplementary Fig. 29b). These results demonstrate the practical viability of the biphasic fluid system in H2O2 production.

Discussion

In summary, we here demonstrated an innovative strategy for continuous H2O2 photosynthesis and extraction. The success key lies in the judicious design of both the photocatalyst material and the reactor. PF-BTTA-COF was prepared via the Schiff-base reaction between tritopic amine and tetratopic aldehyde monomers, followed by perfluoroalkyl functionalization at uncondensed aldehyde sites to afford its surface superhydrophobicity. Such a surface property allows the photocatalyst to be selectively and stably dispersed in oil instead of water. We then constructed a biphasic fluid system by co-feeding water and O2-saturated catalyst-dispersed TFT through transparent tubular flow channels to a coiled reactor under irradiation. The immiscibility of these two liquid phases led to the formation of a series of stable TFT-water biphasic segments with clear interfaces that promoted H2O2 spontaneous extraction. By properly adjusting reaction conditions, we achieved an unprecedented H2O2 production rate of up to 968 μmol h−1 and tunable H2O2 concentrations from 2.2 to 38.1 mM. As-obtained H2O2 solution could be directly supplied to end-users where and when it is needed, and can satisfactorily meet the practical requirements of disinfection and wastewater treatments. Moreover, our biphasic fluid system could be readily scaled up by increasing the channel length or connecting several coiled reactors in parallel or in series.

Methods

Synthesis of BTTA-COF and PF-BTTA-COF

Typically, BTDIPA (30.0 mg, 0.075 mmol) and 2,4,6-tris(4-aminophenyl)-1,3,5-triazine (TAPT) (26.6 mg, 0.075 mmol) were ultrasonically dispersed in a mixture of o-dichlorobenzene, n-butyl alcohol, and 6 M acetic acid (4.4 mL, 5/5/1, v/v/v) in a 25 mL Pyrex tube. The tube was degassed by three vacuum-N2 filling cycles, sealed under vacuum, and heated at 120 °C for 72 h. After cooled down to room temperature, the solid was collected by centrifugation, thoroughly washed with N,N-dimethylformamide (commercial sources and purities), anhydrous tetrahydrofuran, and acetone, respectively, and finally dried under vacuum at 80 °C overnight to afford BTTA-COF as a light-yellow powder (yield: 88%). For the synthesis of PF-BTTA-COF, BTTA-COF (100 mg) was ultrasonically dispersed in ethanol (5 mL), then added with UFHA (500 µL, 2.5 mmol) and acetic acid (50 µL) under stirring. The mixture was stirred at room temperature for 5 h under N2. The product was isolated by filtration, thoroughly washed with ethanol, and dried under vacuum at 80 °C overnight.

Determination of H2O2 concentration

The H2O2 concentration was determined using a colorimetric method as described in our previous publication34. Typically, a ferrous ion oxidation xylenol orange (FOX) solution was prepared by dissolving Fe(NH4)2(SO4)2·6H2O (19.61 mg), D-sorbitol (3.644 mg), and xylenol orange (XO) (14.333 mg) in deionized water (200 mL) added with ethanol (2 mL) and H2SO4 (98%, 272 μL). Subsequently, 50 μL of the obtained H2O2 solution (diluted if needed) was mixed with the pre-prepared FOX solution. The concentration of H2O2 was quantified by monitoring the characteristic absorption peak at 550 nm via UV-Vis spectroscopy according to the calibration curve (Supplementary Fig. 11).

Photocatalytic H2O2 production in a batch system

In a typical batch photocatalytic reaction, 10 mg of photocatalyst was dispersed in 10 mL of pure water (or with 10 vol% BA) inside a top-irradiated Pyrex reactor (120 mL). The suspension was first bubbled with O2 for 30 min before the reactor was carefully sealed. During the photocatalytic reaction, the reactor was irradiated by a 300 W Xe-lamp (China Education Au-light, CEL-HXF300) with a cutoff filter of 420 nm. The light intensity was calibrated to be 200 mW cm−2 using a Newport light-power meter (Model 1918-R). To monitor the reaction process, the reaction solution was extracted every 1 h and filtrated through a syringe filter (0.22 μm) to remove the photocatalyst powder. The resulting H2O2 concentration was quantified using the FOX solution.

Photocatalytic H2O2 production in the biphasic fluid system

In a typical photocatalytic reaction, 140 mg of PF-BTTA-COF photocatalyst was ultrasonically dispersed in 70 mL of TFT (with or without 10 vol% BA). The TFT dispersion (oil phase) and distilled water (water phase) were separately bubbled with O2 for 30 min, and then pumped through a T-shape valve at specific feeding rates by two peristaltic pumps and mixed together. This led to the formation of consecutive oil-water segments, which were fed into a coiled tubular reactor made of polypropylene tubing (Φ1.6 × 3.2 mm). The total tube length in the reactor is 44 m, corresponding to a total volume of ~90 mL. The solution retention time in the flow channel was controlled by the overall flow rate of water and oil. Inside the coiled reactor, the oil-water segments were side-irradiated by a set of LED arrays with a wavelength of 455 nm and a light intensity of 25 mW cm−2. During the photocatalytic reaction, generated H2O2 would migrate across abundant oil-water interfaces and accumulate in the water phase. After passing through the coiled reactor, the oil-water mixed solution was collected in a container, where phase separation occurred spontaneously due to the immiscibility of water and TFT. The upper H2O2 aqueous solution was directly extracted using a peristaltic pump for subsequent uses, while the lower photocatalyst dispersion was pumped back for the next reaction cycle. Such a system achieved continuous H2O2 production and extraction as well as photocatalyst recycling. The H2O2 concentration at the outlet was determined every 1 h using the FOX solution.

Long-term continuous H2O2 photosynthesis in the biphasic system

The long-term continuous photocatalysis in the biphasic fluid system was conducted under similar conditions. 1.2 g of PF-BTTA-COF was dispersed in 300 mL of O2-saturated TFT and BA (30 mL, 9:1, v/v). The flow rates of oil and water phases were kept at 1.04 mL min−1 and 2.08 mL min−1, respectively. The H2O2 concentration at the outlet was determined every 2 h using the FOX solution.

Antibacterial experiments

The antibacterial effect of the as-obtained H2O2 solution was estimated by the plate colony counting method. Staphylococcus aureus (S. aureus) and Escherichia coli (E. coli) were selected as the target bacteria. An individual colony was first cultured in a fresh LB agar plate by shaking at a speed of 200 rpm at 37 °C for 12 h. Then, 30 µL of the initial colony solution was subsequently diluted 100-fold and shaken for another 3 h at 37 °C to ensure bacterial growth in the log-phase, eventually resulting in ~106 colony-forming units (CFU) per milliliter. Then 100 µL of the bacterial solution was incubated with the as-obtained H2O2 solution (500 µL, 5.7 mM) for 3 h. The colonies were photographed after 24 h incubation at 37 °C. Control experiments were conducted under identical conditions except that H2O2 solution was not added.

Dye degradation experiments

Methyl blue (MB) and methyl orange (MO) were chosen as representative organic dyes for the degradation experiments using the Fenton reaction process. In a typical experiment, a stock solution containing dye (100 ppm) and FeSO4 (6 mM) was prepared, and its pH value was adjusted to 3.0 using diluted H2SO4. Subsequently, 2 mL of the as-obtained H2O2 solution (5.7 mM) was added to 2 mL of the above-mentioned dye solution in the dark. The absorbance of the organic dye at its maximum absorption wavelength was recorded using UV-Vis spectroscopy, and its concentration was calculated based on the calibration curve with standard solutions.