To improve dye retention, there is a concurrent interest in the development and optimization of an alternative and promising method for the dye recovery in aqueous solutions. In this regard, considerable attention was paid to the polyoxometalates (POMs) assisted ultrafiltration (POMAUF). The aim of the present study is to eliminate toluidine blue (TB) dye by ultrafiltration membrane using keggin polyoxometalates (POMs) as complexing agents. In the first step, the keggin polyoxometalates K3[PW12O40]∙6H2O (PW12) and K7 [PW11O39]∙14H2O (PW11) were prepared. Then, the obtained powders were characterized by X-ray diffraction and infrared spectroscopies. Afterwards, the removal of toluidine blue (TB) using polyoxometalates assisted ultrafiltration (POMAUF) was studied. Factors affecting the retention of dye and permeate flux such as transmembrane pressure, operating time, polyoxometalates concentration, ionic strength, surfactant and pH were investigated. All results of both compounds have been presented and discussed. The results reveal that the addition of POMs leads to an increase in dye retention from 11 to 95% for the PW12 and to 98% for the PW11. The results of this work have thus suggested the promising enhancement of ultrafiltration membrane selectivity for the dye removal using new complexing agents such as POMs in place of polyelectrolytes and surfactants.