At mid-ocean ridges (MORs), seawater carrying dissolved sulfate (SO4) infiltrates the oceanic crust. Hydrothermal fluid emissions from such systems have much lower δ34S and sulfur is mostly present as reduced sulfide, albeit in lower total sulfur concentrations than in seawater. This has been explained by anhydrite formation and sulfate reduction based on petrographic evidence and mass balance considerations. Here, we utilize the chemical and stable isotope (δ34S, δ18O) systematics in natural anhydrite and pyrite from various locations along the submarine and on-land section of the Mid-Atlantic ridge near Iceland to quantify the key variables that control anhydrite formation and sulfate recycling in the oceanic crust. Hydrothermal anhydrite exhibited δ34S values of +20.6 ± 1.0‰ and δ18O values between +2.4 to +25.3‰. Volcanogenic anhydrite in encrustations showed δ34S values of −1.7 to +21.4‰ and δ18O values between +1.4 and +38.0‰. Hydrothermal pyrite exhibited δ34S values ranging from +3.4 and +19.7‰. Comparison of the natural dataset with results from geochemical isotope modelling revealed that δ34S and δ18O values of anhydrite and pyrite were dependent on the isotope composition of the source fluid, extent of water–rock interaction, temperature, and redox conditions. Departures of δ34S and δ18O values in anhydrite from the source fluid were caused by progressive fluid-basalt interaction where lower δ34S and δ18O values reflected a change in sources of S and O from solely fluid to basaltic origin. The δ18O values of anhydrite were additionally affected by temperature. Quantitative formation of anhydrite mainly occurred at temperatures < 150 °C, whereas at elevated temperatures (>200 °C) reduction of seawater-sulfate to H2S and subsequent pyrite precipitation were found to limit anhydrite formation. Extending our calculations to the oceanic crust revealed that the majority of seawater-sulfate is sequestered into anhydrite (3–38 Tg S yr−1) in vicinity of MORs at < 200 °C at shallow depth (<1500 m), with only a small portion of seawater-derived SO4 discharged by high-temperature hydrothermal vents (0.1–3.4 Tg S yr−1). However, sequestration of sulfur by anhydrite is not long-lasting due to retrograde dissolution of anhydrite. The removal of anhydrite upon cooling and aging of the crust may result in a return back to the oceans of 10–60% of the sulfur originally sequestered in anhydrite upon hydrothermal alteration in vicinity of MORs.