A process and system for purifying water is disclosed. For example, in one embodiment, the process may be used to remove a divalent salt, such as calcium sulfate, from a water source in order to prevent the divalent salt from precipitating during the process. The water source, for instance, may be fed to an ion separating device, such as an electrodialysis device. In the electrodialysis device, an ion exchange takes place between the divalent salt and another salt, such as a monovalent salt to produce two concentrated salt streams that contain salts having greater solubility in water than the divalent salt. In one embodiment, the two salt streams that are produced may then be combined to precipitate the divalent salt in a controlled manner. During the process, various other components contained within the water feed stream may also be removed from the stream and converted into useful products. In one particular embodiment, the process is configured to receive a byproduct stream from a reverse osmosis process.