In this work, polyaniline (PAni), poly-n-ethylaniline, poly-n-methylaniline and poly-o-anisidine were prepared by chemical polymerization. 1,3 (6 or 7)-napthalenetrisulfonic acid was used for the first time in the literature as a dopant to increase the solubility of the polymers in methanol solution. The structure and properties of these conducting polymers were characterized by FTIR, UV-Vis, elemental analysis and conductivity measurements. Poly(vinylidene fluoride) (PVDF) membranes were modified by PAni and its derivatives and used as cation-exchange membranes. Poly-n-ethylaniline, poly-n-methylaniline and poly-o-anisidine were also used for the first time for this purpose in the literature. Ion-exchange capacity, water uptake and fixed group concentration of the polymer modified PVDF membranes were investigated. The changes in the surface morphologies of non-modified and polymer modified PVDF membrane was investigated by AFM and SEM. The polymer modified membranes were used for the removal of calcium (II) and magnesium (II) ions from water samples with Donnan dialysis (DD) experiments. The modified membranes show excellent stability during 120 days. (C) 2009 Elsevier Ltd. All rights reserved.