In this article, the performance of polyethersulfone (PES) ultra‐ and nanofiltration membranes, prepared with the non‐toxic solvent dimethyl sulfoxide (DMSO), was investigated. The membranes were prepared by immersion precipitation via phase inversion. Experimental results proved that DMSO is a better alternative to N‐methyl‐2‐pyrrolidone (NMP) as solvent for PES ultrafiltration membranes as the membranes had a higher permeability and rejection of bovine serum albumin (BSA). An explanation was found based on experimental cloud point data and scanning electron microscopy images showing the morphology. The rejection of BSA and rose Bengal (RB) was proportional to the polymer concentration. On the contrary, the permeability decreased with increasing polymer concentration. For a casting thickness of 250 µm, an optimal balance between permeability and rejection of macromolecules for ultrafiltration was found at 24 wt % PES. The permeability was inversely proportional to the casting thickness, but a small decrease in rejection was observed when lowering the thickness. A good balance between permeability and rejection of RB was found, using a reference nanofiltration membrane of 28.5 wt % PES with 150 µm casting thickness. This membrane achieved a RB rejection of 95.3% and a pure water flux of 2.03 L m−2 h−1 bar−1. The membrane thickness and polymer concentration did not have a clear influence on the hydrophilicity of the membranes. It can be concluded that DMSO is a benign alternative as compared to traditional solvents such as NMP and also results in better PES membrane performances. DMSO is a perfectly suitable solvent for ultrafiltration applications and has potential to be used for nanofiltration applications. © 2018 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2018, 135, 46494.