Open Access Article
Oliver
Stölting
,
Yaşar
Krysiak
and
Sebastian
Polarz
*
Leibniz-University Hannover, Institute of Inorganic Chemistry, Callinstraße 9, 30167 Hannover, Germany. E-mail: sebastian.polarz@aca.uni-hannover.de
First published on 1st October 2025
The value of the band gap of a semiconductor is a primary factor in determining its suitability for applications, such as in photovoltaics or photocatalysis. Carbon nitride (C3N4; Egap = 2.7 eV) is an attractive representative, as it is a non-toxic material containing abundant elements. Future technologies, e.g., in optical computing, demand semiconductors in which one can reversibly change key characteristics such as Egap by preferably simple methods (temperature, pressure, presence of ions) and reversibly. The current paper demonstrates that carbon nitride protonated by hydrofluoric acid (HF) fulfills these requirements. The protonation process is studied in detail, and unlike the reaction with hydrochloric acid, the reaction with HF is topotactic. The attachment of the protons to the nitrogen atoms only induces a decrease in the interlayer spacing. However, the intralayer spacing increases due to the incorporation of π-bonded fluoride ions in the voids of the carbon nitride planes. These effects together lead to a pronounced structure–property correlation and a notable blue shift of Egap to almost 3 eV. Pristine carbon nitride can be restored by simple thermal treatment. Even more interestingly, a third and new state can be reached by applying pressure. Thus, one can switch reversibly between these three states by using HF, temperature, and pressure.
As with every catalyst, it is also desirable for CN to achieve materials with highest possible surface area and porosity.8 One of the most powerful methods for preparing porous materials in general is the use of templates,9 which are removed after the formation of the network material. The so-called hard-templating variant10 is extremely valuable for creating customized pore structures for materials that require a single process step at high temperatures (≫300 °C) during their synthesis, such as carbons and also CNs.11 Because the template must withstand such conditions, silica is the first choice; ideally, the shape and size of the pores resemble those of the template. A typical procedure involves the use of monodisperse silica spheres of the Stöber type,12 which are assembled into colloidal crystals. The packing voids are filled with a network precursor. After condensation/polymerization, the silica spheres can be removed. The resulting materials are described in the literature as inverted opals, and the pore structure resembles the packing of the silica colloids.13–15 The described method works excellently for the preparation of porous carbon materials, and examples of making inverse CN opals also exist.16,17–19 The removal of the template is a crucial step, and the stability of fully condensed silica requires quite harsh methods. Almost all silica templates in the literature are removed using hydrofluoric acid20–26 (HF) or ammonium bifluoride (NH4HF2), which is easier to handle. The formation of gaseous SiF4 enables quantitative removal of the template.27
Due to the stability of aromatic sp2-bonded centers against electrophilic attack, HF etching works well for preparing porous carbon materials. However, the sp2-N centers in CN possess additional lone pairs. Therefore, it is highly important to examine the consequences of HF treatment in depth and determine whether protonation alone is relevant or if the presence of fluorine leads to specific effects. Graphitic carbon nitride has several sites where protonation could occur, including pyridinic nitrogen in the heptazine unit, tertiary and secondary linking nitrogens, and primary amines resulting from defects. Additionally, the extended conjugation stabilizes the proton uptake, whereby the pKa of protonated mpg-CN could be measured to approximately 6.6.28 Thus, strong acids with a pKa < −6 can protonate carbon nitride, thereby influencing its optoelectronic properties.29 This effect is often attributed to the exfoliation of the materials. Although HF is a relatively weak acid (pKa = 3.1), it is expected to protonate CN to some extent. Tan et al. indicate that the properties of porous CN change after adjustment of the pH, subsequent to silica template removal using NH4HF2.30
Reactions with fluorine atoms could be observed during treatment at higher temperatures. For instance, if fluorine-containing compounds such as sodium- or ammonium fluoride are integrated directly into the synthesis prior to condensation, fluorine doping occurs. C–F bonds are created along with rehybridization of the carbon atoms to sp3.31 Alternatively, fluorine can be introduced through hydrothermal treatment or a high-temperature reflux reaction of already polymerized carbon nitride with sodium fluoride or hydrofluoric acid.32–34 The incorporation of F-centers leads to a decrease in Egap.
Here, we investigate in detail the consequences of acid treatment (HF, HCl) at room temperature on the structure and electronic properties of graphitic carbon nitride. We observe pronounced changes that are unique to HF, due to the creation of stacking defects and curvature of the layers in CN. The effects are fully reversible, indicating that CN should be regarded as a material with pH-adaptive properties.
The use of hydrofluoric acid needs special equipment like full protection clothing and fume hood and must be treated with caution.
The intensity and full width at half maximum (FWHM) of all reflections increase slightly while the reflection area remains nearly constant, suggesting that no exfoliation of the layers has occurred. Exfoliation would cause a strong reduction in the overall intensity (peak area) due to the reduction in periodic stacking with simultaneous broadening of the FWHM. Therefore, the widening of the FWHM with a relatively constant peak area rather speaks for an inhomogeneous change in the stacking behaviour. Additionally, the intensity of the weak (310) reflection increases at low HF concentrations and then decreases as the concentration increases. This reflection is typically associated with non-ideal type stacking, which may indicate a partial transition in the stacking order of the layers induced by HF treatment.37
If only the surfaces of BCN were protonated, one could not observe a shift in the lattice planes. Therefore, protons are also attached in the volume phase. Considering that charge neutrality requires that F− ions have to be incorporated as well, the contraction in the (002) direction is remarkable. We assume that F− occupies vacant positions in the layers, which is consistent with the expansion in this direction and will be discussed in further detail below.
The visual inspection of the samples (Fig. 1c) indicates that the structural changes correlate with changes in the electronic properties. BCN appears coloured due to weak absorption of light in the VIS. The higher x, the more decolorization is observed. This effect is due to a gradual shift of the absorption edge towards higher energy as deduced from UV/Vis diffuse reflection measurements (Fig. S1). The UV-vis spectra shown were converted into Tauc-plots presented in Fig. 1b, from which Egap was determined. BCN exhibits a band gap of 2.75 eV, which is in good agreement with values reported in the literature.2 The different degrees of protonation lead to a shift of Egap to 2.91 eV for F48CN. Actually, the UV-vis spectra (Fig. S1) display two distinct absorption bands at approximately λ1,2 = 280 nm and 390 nm. According to Jacob et al.,38 the peak at λ1 arises from a transition involving degenerated π electrons, while the absorption at λ2 is associated with interlayer electronic interactions. Interestingly, the UV/Vis spectra show that the relative intensity of the band λ2 weakens, indicating a reduced interaction between the layers, which seems to contradict the contraction of the lattice in the (002) direction. A possible explanation is that protonation reduces the interlayer electronic interaction, but leads to planarization and eventually different stacking, which in turn results in denser packing.
Photoluminescence (PL) data were recorded next (Fig. 2 with Jacobian correction;39 uncorrected data in Fig. S2). In line with the absorption data, a blue shift in the emission peak maxima is observed with increasing HF concentration. Subtle changes in the charge carrier dynamics can be observed by time-resolved photoluminescence measurements (Fig. 2b). The decay curves, fitted using a triexponential model (Table S1), show a decrease in the average lifetime because of HF treatment. According to Merschjann et al.,40,41 charge transfer in carbon nitride occurs predominantly between the layers. A potential explanation for the higher lifetime of excitons is that electron–hole recombination is aggravated in FxCN materials.
Because of the weak acidity of HF, it is unclear if protonation, fluoride intercalation, or both are responsible for the observed structural changes. Therefore, we performed reference experiments using sodium fluoride (NaF) or hydrochloric acid (HCl). The samples were analysed in analogy to the HF-treated BCN, and the data are given in the Fig. S3 and S4. As expected, NaF has no effect on BCN. The interlayer distance and Egap remain unaltered as shown in Fig. 3. For ClxCN, however, a similar trend is observed compared to FxCN. There is a linear correlation between decreasing interlayer distance and increasing band gap. Notably, the sample treated with concentrated HCl (Cl37CN) exhibits the most pronounced changes, with a reduced interlayer distance of 3.20 Å and a corresponding band gap of 2.98 eV. These findings suggest that a partial or full protonation is the main factor determining the band gap shift observed in acid-treated carbon nitride. Protonation is most likely to occur at the nitrogen centers, which will increase their electronegativity. However, another factor can contribute. The larger intraplane distances reduce the overlap integral. Both factors change the energy of the crystal orbitals and, thus, impact Egap.
![]() | ||
| Fig. 3 Plot of the interlayer distance versus band gap for NaF (purple triangles), HF (red squares) and HCl (blue circles) treated samples. | ||
To investigate the extent of protonation, zeta potential measurements were conducted. Bulk carbon nitride exhibits a negative zeta potential of −32.3 mV, which shifts to +37.1 mV upon treatment with HCl (Cl37CN), consistent with complete protonation as reported in the literature.29 Similarly, the sample treated with F48CN shows a positive zeta potential of +18.4 mV, indicating partial protonation. This corresponds to approximately 73% of the surface charge change observed in the HCl-treated sample, which aligns well with the 70% increase in band gap relative to the HCl-treated reference, further supporting the role of protonation in modulating the optoelectronic properties.
Are there no further differences between FxCN and ClxCN except for the degree of protonation? Fig. 4 shows the ultraviolet photo-electron spectroscopy (UPS) spectra of BCN, F48CN, and Cl37CN. Despite the lower degree of protonation in F48CN, one sees that, in particular, the valence band (VB) is shifted to lower energies than is the case for Cl37CN. The conduction band (CB) is now shifted to a much more negative potential compared to BCN. This means that the halogenide counterion must also be important for the electronic properties.
An interesting difference between the HF and the HCl treatment can also be deduced from nitrogen physisorption measurements shown in Fig. 5. The isotherms indicate that the prepared BCN is an almost non-porous solid with a low specific surface area SBET = 7.1 m2 g−1. HF treatment has no effect, but the application of HCl almost doubles the surface area, which can be explained by partial exfoliation of the layers. The latter findings are consistent with measurements performed using scanning electron microscopy (SEM), as shown in Fig. S5. A strong change in the material's appearance and partial fragmentation is seen for Cl37CN, which does not occur in F48CN. The described trends are confirmed by atomic force microscopy (AFM Fig. S6). In contrast to F48CN, a significant reduction in particle height size can be observed for Cl37CN, which supports partial exfoliation and larger structural changes. Chlorine ions (ionic radius 181 pm) are too large to fit the void in BCN (≈170 pm radius).42 Balancing the charge of the protons, leads to inclusion between the layers, exfoliation and all together more enhances fragmentation.
N (1627 cm−1), C
N (1548 cm−1), C–N (1394 cm−1) stretching vibrations, as well as N–H bending vibrations from the bridging units such as C–N(C)–C or partial condensed C–N(H)–C at 1308 cm−1 and 1224 cm−1, respectively.43,44 Additionally, a broad absorption band between 3400 and 2900 cm−1 is observed, which can be ascribed to N–H stretching vibrations from terminal amines, secondary linkages, hydrogen bonding, and potentially adsorbed water. All characteristic peaks are retained in the FxCN samples, indicating that the treatment is non-destructive. Furthermore, no additional signals, such as C–F vibrations around 1220–1000 cm−1 are detected (see also the Fig. S7), suggesting that fluorine doping into carbon nitride can be excluded.31 However, a closer examination of the aromatic region between 1700 and 1200 cm−1 in Fig. 6b and c reveals notable shifts in the peak positions.
In particular, the vibrational modes associated with bridging units exhibit a clear shift towards higher wavenumbers starting from F10CN. For F20CN, the C
N stretching vibration at 1627 cm−1 exhibits a red shift, while the other aromatic vibrations display a blue shift. This indicates that the HF treatment alters the local chemical environment, specifically weakening certain C
N bonds, while strengthening other C–N and C
N bonds. Such behaviour may be attributed to changes in dipole moments, local electronegativity, or modifications in hydrogen bonding. A similar trend is observed for the breathing mode of the heptazine units in Fig. 6c, which also shifts to higher wavenumbers from F20CN onwards. This blue shift implies a reduction of hydrogen bonds or an increase in structural rigidity, possibly due to steric effects. We propose that the opposing peak shift results from a redistribution of charge within the heptazine framework, likely caused by protonation of the ring nitrogen atoms (C
N–C). Protonation reduces the electron density on the nitrogen atom, thereby diminishing the double bond character of the C
N.45,46 Concurrently, polarisation effects may enhance the strength of adjacent C–N and C–N(C/H)–C. The opposing vibration shift can also be tracked in the secondary plot of the band gap versus vibration band shift in Fig. S8. Again, the HCl-treated samples show a very similar behaviour (Fig. S9 and S10). The red shift of the C
N vibration is more pronounced in the HCl-treated sample, which correlates well with the higher degree of protonation indicated by the zeta potential measurements.
To further support our conclusion, X-ray photoelectron spectroscopy (XPS) measurements were conducted. Fig. S11a presents the survey XPS spectra of BCN in comparison to F48CN and Cl37CN. In all samples, the characteristic C1s and N1s peaks of carbon nitride are observed. Additionally, signals from oxygen are present across all spectra, attributable to structural defects and residual adsorbed water molecules introduced during thermal pyrolysis. The acid-treated samples also exhibit the expected signals corresponding to the respective counter-ions. High-resolution XPS spectra of the N1s (Fig. 7a) and C1s (Fig. 7b) regions were acquired and deconvoluted. According to Lau et al.,47 the N1s spectrum of bulk carbon nitride can be deconvoluted into four components: the heptazine C
N–C at 398.45 eV, a peak at 399.44 eV corresponding to C–NH–C and NH2, which arises from partially condensed linkages and residual primary amines, a third component at 400.71 eV assigned to C–N(C)–C and a high binding energy feature at 404.47 eV attributed to a shake-up satellite of the π system.47 The C1s spectrum can similarly be deconvoluted into several components: C
C at 284.60 eV due to impurities such as dust or measured carbon tape, residual C–NH2 at 286.20 eV, heptazine N
C–N at 287.99 eV, N–C–O at 288.97 eV, and also a satellite peak of the π system at 293.64 eV.48
All components are also present in the acid-treated samples. Notable shifts are observed. Upon protonation, the C
N–C peak in the N1s region as well as in the C1s region exhibits a blue shift relative to that of untreated BCN, supporting the FTIR-based conclusion that protonation occurs directly on the heptazine ring. In addition, a simultaneous blue shift of the C–N(H)–C/–NH2 peak is observed, suggesting a coupling effect to the C
N–C or an additional protonation site. Given that, even in melamine derivatives, the nitrogen atoms within the triazine ring are more prone to protonation than the terminal amines. Considering our FTIR data indicating a simultaneous shift in the C–N(H)–C vibration, protonation of the heptazine framework leads to a side effect on C–N(H)–C. Still, it should be mentioned that a second protonation site on partially condensed bridging nitrogen cannot be sufficiently ruled out at this point. In addition to the C1s region, no peaks associated with covalent C–F or C–Cl bonds are observed in the high-resolution spectra of the counter ions (Fig. S11), which, together with the FTIR results, rule out additional doping.
The corresponding elemental compositions are summarized in Table 1, based on the detailed data presented in Tables S2–S5. Notably, in contrast to the HCl treatment, the HF-treated sample exhibits a threefold higher atomic concentration of the counter-ions. The latter result is surprising, as the HCl sample has partially exfoliated, and the degree of protonation is higher. The C
:
N ratio remains unchanged, which indicates that there are no point defects created, as others have assumed.49
| Samples | C% | N% | O% | F% | Cl% | C : N |
|---|---|---|---|---|---|---|
| BCN | 39.69 | 59.11 | 1.20 | — | — | 0.67 |
| F48CN | 38.84 | 57.92 | 2.79 | 1.07 | — | 0.67 |
| Cl37CN | 40.52 | 55.85 | 3.59 | — | 0.15 | 0.73 |
From the collected data, we can now propose a model for FxCN materials, which is schematically shown in Scheme 1. HF treatment leads to the protonation of aromatic nitrogen atoms throughout the volume of the carbon nitride. The degree of protonation can be fine-tuned by the HF concentration. The F− ions are incorporated into the structure, resulting in a small but detectable intralayer expansion and a reduced interlayer interaction. Planarization of the layers induces a contraction in the (002) direction, accompanied by a change in the stacking order of the layers.
![]() | ||
| Scheme 1 Scheme of HF and HCl treatment of BCN. With higher magnification of the FxCN structure (m = “melon type”, g = “ideal graphitic carbon nitride”). The colour of nitrogens represents the N1s fits in Fig. 7. | ||
Determining whether a new stacking order is favoured in a semi-crystalline material remains challenging. However, in the structurally related crystalline material poly(triazine imide) (PTI), a change in stacking upon treatment with acid has already been reported.50 DFT calculation determines a band gap of 2.44 eV for a AA stacking, whereas AB stacking has a band gap of 2.73, whereby the AB stacking has a more negative CB edge potential.51 Whether carbon nitride adopts an AA or AB stacking configuration remains a subject of debate to its semi-crystalline character.36,38,51,52 Nonetheless, it is widely accepted that the most energetically favourable stacking maximises attractive π–π interactions while repulsive interactions are minimized, resulting in a staggered AA or AB stacking. Upon protonation, the carbon nitride layers tend to planarize, reducing the interlayer distance and potentially favouring a new stacking arrangement. This reduced spacing facilitates lateral displacement, driven by the minimisation of charge interactions between the layers, an effect promoted by protonation and also the presence of associated counter-ions. All factors together contribute to the unique change in the electronic properties of FxCN.
In comparison, HCl is even more capable of protonating BCN, which also leads to a blue shift of Egap. However, it seems that Cl− is too large to be incorporated into the structure. Partial exfoliation is the consequence.
Therefore, and due to the high volatility of HF, we expect that a thermal post-treatment of protonated samples (T-F48CN) again leads to deprotonation and potential restoration.29Fig. 8a contains the UV/Vis spectra after thermal treatment of F48CN in a nitrogen atmosphere. The band gap shifts back to the original value of BCN (see Fig. S12). Thus, one could go back and forth as indicated in Scheme 1.
Interestingly, the application of pressure leads to new and unexpected effects for F48CN exposed to pressure (p-F48CN). Egap = 2.84 eV has shifted to a lower energy, approaching the value of BCN; see (Fig. S12). However, the UV/Vis spectra (Fig. 8a) indicate a unique situation. One sees that the spectral feature at λ2 has gained in intensity. Additionally, an absorption feature beyond 400 nm appears, which can be assigned to the n to π* transition. This transition is only observed in non-planar structures like corrugated carbon nitride, as the nitrogen lone pair electrons must be out of plane.53 The analysis of the p-XRD data demonstrates that the interlayer distance is slightly further reduced under pressure, which is an opposite correlation of Egapversus d002 (Fig. 8b) compared to that found before (Fig. 3). The pressure treatment may induce a structural corrugation and restacking of the carbon nitride layers (Scheme 1). Our interpretation is underlined by FT-IR and XPS measurements of p-F48CN. The value for the wavenumber of the C
N vibration indicated that the groups are still protonated (see Fig. S13). The origin of the observed corrugation can be elucidated by comparing the F1s XPS spectra of F48CN and p-F48CN (Fig. 8c). Two species are found. One resembling free F− and one in which the fluoride is more tightly bound. We assign the latter signal to the fluoride centers located in the vacancies of the CN layers (see Scheme 1). Small and highly polarizable ions like fluoride can also generate strong anion–pi interactions in addition to hydrogen bonds. In this case, the pi system must be electron-deficient.54–56 Both interactions should be strengthened or even made possible by the number of hydrogen bond formers and electron-deficient pi systems in protonated carbon nitride. Therefore, we believe that fluoride ions lie within the intra layer vacancies and plausibly interact with the pi system of other layers, probably changing the corrugation or stacking of layers. Our model of π interactions is supported by structural investigations in which one sees that the radius of F− (128 pm) has become markedly smaller compared to pure electrostatic interactions.57
The XPS measurements show that the π-bonded fluorides have vanished almost completely after application of pressure. One can imagine that pressure counterbalances the necessary intralayer expansion. The reduction of d002 is inconsistent with F− populating the interlayer spaces, and exfoliation can also not be observed. Therefore, we assume that the counterions are expelled from the bulk towards the surface upon pressure treatment, as indicated in Scheme 1.
In contrast to pressure-induced irreversible effects like defect healing and partial bond breaking at high pressure with low condensed precursors,58 pristine BCN displays no change after pressure treatment (Fig. S14). Therefore, the protonation-induced effect represents a new reversible pressure sensor. To visualise this, a fivefold cyclic switching is shown in Fig. 9; UV/Vis data (Tauc-plots) shown in Fig. S15. It can be recognised that the pressure-induced effect can be fully reversed by renewed HF treatment. The structural stability is documented by pXRD measurements shown in Fig. S16. Herein, a cyclical change in the layer spacing can be interpreted. The topotactic behaviour ensures structural stability even after 5 cycles without any noticeable deterioration.
![]() | ||
| Fig. 10 (a) Photocatalytic degradation of Rhodamine B and (b) corresponding plot of –ln(c/c0) versus irradiation time for comparison of reaction rate constants (k). | ||
However, the current paper demonstrates that HF treatment brings substantial benefits. The collected data indicate that the reaction of carbon nitride with hydrofluoric acid is topotactic in nature. Unlike HCl, there is no exfoliation, and F− ions appear to be stored reversibly in intralayer voids of the carbon network. Additional π-interactions, enhanced planarization of the layers, and reduced interlayer spacings lead to a unique electronic situation. In addition to tuning Egap, the position of the conduction band is now at a much more negative potential, which could make FxCN even more interesting for photocatalytic applications, which was tested and proven. A particularly interesting case for future research can be to use nanostructured carbon nitride materials in their FxCN variant for testing benefits in carbon dioxide (CO2) photoreduction or in the water splitting reaction. However, it needs to be considered that a high surface area is a key property for any catalyst. While our study was on BCN, we think that the results shown herein show a new way to adjust the properties of nanostructured CN to a much higher degree. The presented results are actually good news for preparing nanostructured carbon nitride via hard templating methods. Dissolution of silica templates via HF treatment will not destroy the crystal structure, but one has to be aware that the obtained material is electronically different from pristine carbon nitride. If similar effects can also be reached using the milder and less toxic ammonium bifluoride reagent will be studied soon, which could then offer a greener, scalable alternative here.
The topotactic nature of the inclusion of HF cannot only be reversed by temperature treatment, but we also found that the application of pressure leads to unique effects. The pressure (433 MPa) is relatively low, compared to other reports on pressure-induced changes of solid-state compounds (GPa range). A third state is reached in which the carbon nitride is still protonated, but the F−centers have changed their position. A proof-of-concept result was presented for using this novel property as a carbon nitride-based pressure sensor. The special property of FxCN, a topotactic adjustment of the band gap, could therefore in the future be used in non-human-related areas, whereby the colour of the material can be detected directly. One concrete example is the detection of pressure changes caused by the deterioration of buildings such as bridges.
| This journal is © The Royal Society of Chemistry 2025 |