The study of halophytes as sources of phenolic compounds, as well as conditions that further enhance the accumulation of biologically active compounds in them, is of particular interest. In this paper, the effect of different salinity levels (25–500 mM in the form of NaCl) on the content of phenolic compounds and the antioxidant activity of two rare halophyte speciesSpergularia marina(L.) Griseb. andGlaux maritimaL. culturedin vitrowas investigated. A species-specific reaction of plants to salinization was established. InG. maritima, the maximum total content of phenolic compounds was observed at 50–100 mM, flavonoids 75–400 mM, and hydroxycinnamic acids 200–300 mM, as well as individual phenolics (protocatechuic acid, catechin, astragalin, hyperoside, rutin, isoquercitrin, and apigenin derivative) at 100–300 mM NaCl. ForS. marina, on the contrary, there was a slight decrease in the content of phenolic compounds when NaCl was added to the nutrient medium compared to the control. The content of protocatechuic acid, rosmarinic acid, and apigenin derivative significantly decreased with increased salt stress. The change in antioxidant activity at different salinity levels was also species specific. The maximum values of different groups of phenolic compounds inG. maritimawere observed at 50–300 mM NaCl. The cultivation ofS. marinawithout the addition of NaCl and at 500 mM NaCl allowed the production of plants with the highest content of phenolic compounds. The obtained results can be further used in the development of protocols for the cultivation of these plantsin vitroin order to induce the biosynthesis of phenolic compounds in them.