A method for on-wafer fabrication of free-chlorine sensors is described. The sensor structure consists of a planar three-electrode electrochemical cell covered with a poly(hydroxyethyl methacrylate) hydrogel membrane. This membrane is photolithographically patterned on-wafer. In order to guarantee good adhesion of the membrane to the electrode surface a special oxidation step consisting of a treatment in an oxygen plasma followed by a silanization procedure has been developed. The optimal operational polarization voltage of the integrated sensor for detection of hypochlorous acid was found to be 0 mV vs. the on-chip Ag/AgCl reference electrode in a solution of 0.1 M KCl. Sensors with membrane thicknesses of 10 and 50 μm are found to give linear calibration curves between 0.1 and 5 mg l-1 free chlorine, with sensitivities of 2.0 and 0.4 nA (mg l-1)-1, respe tively.