Developing efficient wafer cleaning and rinsing requires technology for on-line monitoring of the wafer cleanliness. An electrochemical sensor is designed, fabricated, and tested to measure the concentration of residual contaminants on the wafer surface during the rinse process. The sensor is based on the real time and in situ measurement of electrical impedance across a trench microstructure. The sensor's output signal is proportional to the concentration of impurities remaining in the trench and, therefore, is a measure of the progress of the rinse in cleaning the wafer surface. Electrical measurements, circuit analysis, and direct testing of the device at known impurity levels are used to select and design a suitable sensor configuration. The results confirm the feasibility and sensitivity of the device applicable to typical wafer rinsing conditions.