To create a self‐cleaning feature and improve antifouling property, polysulfone (PSf) membranes were modified with WO3 and polyaniline (PANI) nanoparticles (0–2 wt%) via phase inversion method for ultrafiltration of landfill leachate. The mass ratio of WO3 nanoparticles was varied between 0, 40 and 60 wt% in different loadings. All synthesized membranes were tested with and without UV irradiation to evaluate the self‐cleaning feature. The synthesized PANI was analyzed with scanning electron morphology (SEM), atomic force microscopy (AFM) and Fourier transform infrared spectroscopy (FTIR). The surface hydrophilicity of the modified membranes increases with increasing the nanoparticle loadings (0–2 wt%). The membrane morphology indicated higher porosity and more finger like pores for the modified membranes. The porosity of 86.8% was achieved for the membrane containing 2 wt% PANI. The flux recovery ratio (FR) of membranes without UV radiation was increased by increasing the ratio of PANI to WO3 nanoparticles, while the antifouling ability of membranes including WO3 nanoparticles improved and reached to 98.87% after UV radiation. The highest COD removal before (76.65 %) and after (78.42%) UV radiation was obtained for the membrane containing 2 wt% nanoparticle loading. Copyright © 2016 John Wiley & Sons, Ltd.