The ketone body beta-hydroxybutyrate (βHB) is a histone deacetylase (HDAC) inhibitor and has been shown to be protective in many disease models, but its effects on aging are not well studied. Therefore we determined the effect of βHB supplementation on the lifespan ofC. elegans nematodes. βHB supplementation extended mean lifespan by approximately 20%. RNAi knockdown of HDACs hda-2 or hda-3 also increased lifespan and further prevented βHB-mediated lifespan extension. βHB-mediated lifespan extension required the DAF-16/FOXO and SKN-1/Nrf longevity pathways, the sirtuin SIR-2.1, and the AMP kinase subunit AAK-2. βHB did not extend lifespan in a genetic model of dietary restriction indicating that βHB is likely functioning through a similar mechanism. βHB addition also upregulated ΒHB dehydrogenase activity and increased oxygen consumption in the worms. RNAi knockdown of F55E10.6, a short chain dehydrogenase and SKN-1 target gene, prevented the increased lifespan and βHB dehydrogenase activity induced by βHB addition, suggesting that F55E10.6 functions as an inducible βHB dehydrogenase. Furthermore, βHB supplementation increased worm thermotolerance and partially prevented glucose toxicity. It also delayed Alzheimer's amyloid-beta toxicity and decreased Parkinson's alpha-synuclein aggregation. The results indicate that D-βHB extends lifespan through inhibiting HDACs and through the activation of conserved stress response pathways.