The antibiotic sulfamethoxazole (SMX) undergoes direct phototransformation by sunlight, constituting a notable dissipation process in the environment. SMX exists in both neutral and anionic forms, depending on the pH conditions. To discern the direct photodegradation of SMX at various pH levels and differentiate it from other transformation processes, we conducted phototransformation of SMX under simulated sunlight at pH 7 and 3, employing both transformation product (TP) and compound-specific stable isotope analyses. At pH 7, the primary TPs were sulfanilic acid and 3A5MI, followed by sulfanilamide and (5-methylisoxazol-3-yl)-sulfamate, whereas at pH 3, a photoisomer was the dominant product, followed by sulfanilic acid and 3A5MI. Isotope fractionation patterns revealed normal 13C, 34S, and inverse 15N isotope fractionation, which exhibited significant differences between pH 7 and 3. This indicates a pH-dependent transformation process in SMX direct phototransformation. The hydrogen isotopic composition of SMX remained stable during direct phototransformation at both pH levels. Moreover, there was no variation observed in 33S between the two pH levels, indicating that the 33S mass-independent process remains unaffected by changes in pH. The analysis of main TPs and single-element isotopic fractionation suggests varying combinations of bond cleavages at different pH values, resulting in distinct patterns of isotopic fractionation. Conversely, dual-element isotope values at different pH levels did not significantly differ, indicating cleavage of several bonds in parallel. Hence, prudent interpretation of dual-element isotope analysis in these systems is warranted. These findings highlight the potential of multielement compound-specific isotope analysis in characterizing pH-dependent direct phototransformation of SMX, thereby facilitating the evaluation of its natural attenuation through sunlight photolysis in the environment.