A system for monitoring water quality for dialysis, dialysis fluids, and body fluids treated by dialysis fluids, is disclosed. The system uses microelectromechanical systems (MEMS) sensors for detecting impurities in input water or dialysis fluid, and in the prepared dialysate. These sensors may also be used to monitor and check the blood of the patient being treated. These sensors include ion-selective sensors, for ions such as ammonium or calcium, and also include amperometric array sensors, suitable for ions from chlorine or chloramines, e.g., chloride. These sensors assist in the monitoring of water supplies from a city water main or well. The sensors may be used in conjunction with systems for preparing dialysate solutions from water for use at home or elsewhere.