Wastewater is an underleveraged resource; it contains pollutants that can be transformed into valuable high-purity products. Innovations in chemistry and chemical engineering will play critical roles in valorizing wastewater to remediate environmental pollution, provide equitable access to chemical resources and services, and secure critical materials from diminishing feedstock availability. This perspective envisions electrochemical wastewater refining—the use of electrochemical processes to tune and recover specific products from wastewaters—as the necessary framework to accelerate wastewater-based electrochemistry to widespread practice. We define and prescribe a use-informed approach that simultaneously serves specific wastewater-pollutant-product triads and uncover mechanistic understanding generalizable to broad use cases. We use this approach to evaluate research needs in specific case studies of electrocatalysis, stoichiometric electrochemical conversions, and electrochemical separations. Finally, we provide rationale and guidance for intentionally expanding the electrochemical wastewater refining product portfolio. Wastewater refining will require a coordinated effort from multiple expertise areas to meet the urgent need of extracting maximal value from complex, variable, diverse, and abundant wastewater resources.