A new method for the extraction of both anions and cations is proposed using electro-synthesized polypyrrole (PPy) and overoxidized sulfonated polypyrrole film (OSPPy). In situ anion (chloride, nitrate, sulfate) and cation (calcium, magnesium) uptake and release were examined under controlled potential conditions for prospective applications in electrochemically controlled solid-phase extraction (EC-SPE). The PPy film was used as an anode (anion-exchanger) and OSPPy film was used as a cathode (cation-exchanger) material and reverse order of the electrodes were investigated in EGSPE. This new cell arrangement containing two ion exchanger polymer electrodes was developed to provide in situ removal of both anions and cations from aqueous solution. Simple preparation of the film coatings on a platinum plate was possible using a constant potential method. Applied positive and negative potentials facilitated the in situ extraction and desorption of ions, respectively. Both anions and cations were desorbed into sample aliquot and were determined by ion chromatography (IC). The method was validated using a standard reference material and tested for the determination of the ions in real water samples. (c) 2007 Elsevier B.V. All rights reserved.