The invention relates to methods and devices for the decontamination of fluid, particularly the removal of heavy metals and/or arsenic and/or their compounds from water, by means of electrolysis, wherein the water to be purified subjected to electrodes of different polarities. The invention can include means for control of the pH of the fluid. The invention can also include control systems that allow self-cleaning of electrodes, self-cleaning of filters, and automatic monitoring of maintenance conditions.