Climate change and pollution are increasing drought, salinity and heavy metal contamination in food crops, and, in turn, decrease yield and threaten food safety. Salinity is caused by an excess of NaCl in soils. Salinity is a major abiotic stress for plants over 800 million hectares of land worldwide. Lokhande et al. show that shoreline purslane (Sesuvium portulacastrum) can be used for sand-dune fixation, desalination and phytoremediation in coastal regions.