Aging and fertility are two interconnected processes. From invertebrates to mammals, absence of the germline increases longevity. Here we show that loss of function of sul-2, the Caenorhabditis elegans steroid sulfatase (STS), raises the pool of sulfated steroid hormones, increases longevity and ameliorates protein aggregation diseases. This increased longevity requires factors involved in germline-mediated longevity (daf-16, daf-12, kri-1, tcer-1 and daf-36 genes) although sul-2 mutations do not affect fertility. Interestingly, sul-2 is only expressed in sensory neurons, suggesting a regulation of sulfated hormones state by environmental cues. Treatment with the specific STS inhibitor STX64, as well as with testosterone-derived sulfated hormones reproduces the longevity phenotype of sul-2 mutants. Remarkably, those treatments ameliorate protein aggregation diseases in C. elegans, and STX64 also Alzheimer's disease in a mammalian model. These results open the possibility of reallocating steroid sulfatase inhibitors or derivates for the treatment of aging and aging related diseases.