Desalination as a sample preparation step is essential for noise reduction and reproducibility of mass spectrometry measurements. A specific example is the analysis of proteins for medical research and clinical applications. Salts and buffers that are present in samples need to be removed before analysis to improve the signal-to-noise ratio. Capacitive deionization is an electrostatic desalination (CDI) technique which uses two porous electrodes facing each other to remove ions from a solution. Upon the application of a potential of 0.5 V ions migrate to the electrodes and are stored in the electrical double layer. In this article we demonstrate CDI on a chip, and desalinate a solution by the removal of 23% of Na(+) and Cl(-) ions, while the concentration of a larger molecule (FITC-dextran) remains unchanged. For the first time impedance spectroscopy is introduced to monitor the salt concentration in situ in real-time in between the two desalination electrodes.