Amphotericin B is a clinically vital antifungal drug, but it has high renal toxicity. The compound kills cells by forming sponge-like aggregates on the cell surface that remove molecules called sterols from the cell membrane. High-resolution structures of these sterol sponges guided rational development and synthesis of a new class of antifungals that are better for renal health.