Oil/water separation processes have garnered significant global attention due to the quick growth in industrial development, recurring chemical leakages, and oil spills. Hence, there is a significant demand for the development of inexpensive superwetting materials in an eco-friendly manner to separate oil/water mixtures and emulsions. In this study, a superwetting melamine sponge (SMS) with switchable wettabilities was prepared by modifying melamine sponge (MS) with sodium dodecanoate. The as-prepared SMS exhibited superhydrophobicity, superoleophilicity, underwater superoleophobicity, and underoil superhydrophobicity. The SMS can be utilized in treating both light and heavy oil/water mixtures through the prewetting process. It demonstrated fast permeation fluxes (reaching 108,600 L m-2 h-1 for a light oil/water mixture and 147,700 L m-2 h-1 for a heavy oil/water mixture) and exhibited good separation efficiency (exceeding 99.56%). The compressed SMS was employed in separating surfactant-stabilized water-in-oil emulsions (SWOEs), as well as surfactant-stabilized oil-in-water emulsions (SOWEs), giving high permeation fluxes (reaching 7210 and 5054 L m-2 h-1, respectively). The oil purity for SWOEs' filtrates surpassed 99.98 wt% and the separation efficiencies of SOWEs exceeded 98.84%. Owing to their remarkable capability for separating oil/water mixtures and emulsions, eco-friendly fabrication method, and feasibility for large-scale production, our SMS has a promising potential for practical applications.