Promising technologies for converting wastewater into drinkable water produce a chemical compound that can be toxic, corrosive and malodorous. An analysis of one possible solution reveals ways to optimize it for maximum energy efficiency, pollutant removal and resource recovery.